Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Nao
4651
Features / Re: Virtual selectors in WeCSS
« on August 16th, 2012, 04:02 PM »
I dunno, since I have so much work on so many files right now, I like asking 'easy' questions here when I'm dealing with the real complicated stuff, but even that doesn't inspire anyone... :P

I was thinking of a name that could naturally 'flow' into the naming scheme, something that would remind people of 'index'... So in addition to hacks, I thought of addendum (= latin), postscript (ditto), affix (has an x, 5 letters), extra (ditto!), or just 'fix'...
Since it's a name that's likely to be used a lot by skinners, I'd like to ensure it 'works' per se...
4652
Features / Re: Virtual selectors in WeCSS
« on August 16th, 2012, 01:54 PM »
Or 'addendum.css'?
4653
Features / Re: Virtual selectors in WeCSS
« on August 16th, 2012, 01:53 PM »
It's a custom usort. Look at the code ;)

Anyway. Thus morning I went through all of the code and fixed IE 6.7.8 etc and also renamed all index files to hacks. Maybe 'fix.ie.css' would be better though..?
4654
Off-topic / Re: Nexus 7
« on August 16th, 2012, 11:25 AM »
I was talking about "Wedge - New ways..."
4655
Off-topic / Re: Nexus 7
« on August 16th, 2012, 08:19 AM »
OMG! The '12' in the new post notification disc is off by a pixel! I need to add a hack.android.css file to my skin!

Or maybe not :lol:
It's looking good indeed... Wondering what the replacement font at the top is. Oh, wait, it's just regular Roboto, ahah.
4656
Features / Re: Virtual selectors in WeCSS
« on August 16th, 2012, 07:49 AM »
So... I've decided to (at least temporarily) add YET another prefix type to the main list... So, right now, we have in this order of 'execution':

common.css (virtuals and anything that needs to be in all files including non-index)
index.css (main index file obviously...)
sections.css (per-area styles, although it's always included as well)
hacks.css (browser hacks, RTL hacks)
custom.css (this is the one you can include at will.)

The order in which they're included once you're in a sub-skin may not be intuitive. I'm taking the absolute extreme example of Warm, which is a sub-sub-skin. Here it is:

Code: [Select]
[0] => skins/common.css <--- okay...
 [1] => skins/index.css <--- still fine...
 [2] => skins/index.member.css <--- this one has the CSS that only shows up to members anyway
 [3] => skins/Wine/index.css <-- this is what Wine needs to modify in Weaving
 [4] => skins/Wine/index.member.css <-- and a hack for the original index.member.css
 [5] => skins/Wine/Warm/index.css <-- and now, what Warm needs to modify in Wine...
 [6] => skins/sections.css <-- and now for the per-area CSS...
 [7] => skins/Wine/sections.css <-- and what Wine needs to change to it.
 [8] => skins/hacks.ie[6].css <-- CSS hacks for IE6 to work
 [9] => skins/Wine/hacks.ie[6].css <-- CSS hacks for IE6 to work with Wine
[10] => skins/Wine/Warm/hacks.ie[-9].css <-- CSS hacks for IE 6,7,8 and 9 to work with Warm
     => skins/custom.css <-- Gone, see below.
[11] => skins/Wine/custom.replace.css <-- my own personal custom CSS for Wine (which is empty).
        Because it has the 'replace' keyword, the skins/custom.css file is removed from the list.

As you can see, there's at least one big problem: sub-skins execute their index.css file earlier than their parent's sections.css file. This can lead to huge bugs when it comes to CSS selector precedence.
One solution is to rename Wine/index.css to Wine/hacks.css -- and do the same for other index-type files in all sub-skins.
The main inconvenience is that it doesn't scream "I'm a skin definition!", but "I'm a hack!"... (Even though, that's technically what it is since it isn't a replace-type skin... You're trading off "code beauty" for ease of update.)
Or I could simply include files the way they used to be -- folder by folder, i.e. everything from Weaving first, then all of Wine second, etc... I don't like that, there's *PROBABLY* a reason why I did that -- and the original order was screaming for hacks to be included in different positions. (custom.css?)

Another solution is to just drop 'sections.css' (25KB) and merge it with 'index.css' (35KB), like in SMF. Remains to be seen whether it's nice to have everything in a single large file than in two relatively manageable files...
Or, I could do an exception to my system and just merge sections.css to index.css at sort time, but honestly I don't know how to do that... (it's a real sorting function. It doesn't manipulate names, it manipulates characters...)

Right now I think my preference goes to hacks.css... I don't now. I'm asking.
Any opinions...?
4657
Off-topic / Re: Nexus 7
« on August 16th, 2012, 12:12 AM »
What can I say... I despise Apple, don't like the company and their holier-than-thou attitude, but I do love most of my iPod's features and UI/UX.
I have nothing against Google, and I like the idea of an Open Source mobile OS, but I had the opportunity to test a Galaxy S3 running Chrome and Opera Mobile a couple of weeks ago -- and was extremely disappointed with the UX really. I just didn't feel comfortable with it.

So I'd like an Android device to test my sites on. And hopefully an Apple device to keep browsing with...
(Or maybe the Surface, eh. Heard a rumor that they're going to slash its price...)
4658
Features / Re: Virtual selectors in WeCSS
« on August 16th, 2012, 12:06 AM »
Quote from Arantor on August 15th, 2012, 10:00 PM
I like that syntax structure, and I'd keep the square brackets to be honest.
Okay, done that way...
Added a new function in Load.php, hasBrowser(), that takes a string or array of strings as a parameter, and tries to match the current browser version against it. I'm using it in the macro builder (both the XML and index template versions), in the skin settings' <for=""> param, and obviously when looking through css filenames.
It's not gonna make WeCSS any faster -- but at the very least, it's even more flexible now.

And while testing it, I realized something annoying.
Long ago, Wedge used to compile files in that order: index.css, sections.css, index.ie7.css. Now, mainly for clarity reasons I believe, I'm compiling them in that order: index.css, index.ie[7].css, sections.css. As a result, any custom IE7 changes to section items (like for instance, topic page handling...) are canceled out by the sections.css file that follows. Eh. So that explains why topic pages broke long ago...
One solution is to just move all of my custom things to sections.ie[7].css etc. Or merge index.css and sections.css once and for all. Or rewrite the code to ensure that custom files are executed at the end -- but I don't believe it's for the best.

Quite annoying really... I'm pretty impressed at the number of bugs that I keep adding to the templating system!
Quote
My grandfather is in hospital with a stroke, I spent the last day or so with my grandmother who requires 24-hour care, and then arrange transfer to a care home.
Oh... Sorry about that. So it's the followup to recent weeks then..? :(
4659
Features / Re: Virtual selectors in WeCSS
« on August 15th, 2012, 09:58 PM »
An alternative to that syntax could be...

index.ie[8].css
index.ie[6-9].css
index.ie[-7].css (i.e. 6 & 7)
index.ie[7-].css (i.e. 7 and above)
index.ie[6,7],firefox[1-3].css

Or () or {} instead of []... I don't know. What do you think?
Posted: August 15th, 2012, 09:56 PM
Quote from Arantor on August 15th, 2012, 06:21 PM
I think the pros are probably worth the apparently few cons - but maybe I'm missing something. It's been a very long couple of days for me.
So... What happened? I did notice you weren't there ;)
4660
Features / Re: Virtual selectors in WeCSS
« on August 15th, 2012, 03:54 PM »
So, "while I was at it" (a dreadful thing for me to say usually...), I rewrote the suffix system (again!) to allow for CSS files to be applied depending on the browser version.

Up until now, you could have index.ie6,ie7.css or index.ie6,firefox.css, but not, for instance, index.ie6,firefox14.css -- which was due to the fact that IE sucks so much, it's often a good thing to have custom CSS files for IE6 etc...

From now on, the first file will have to be written this way: index.ie=6,ie=7.css or index.ie-8.css, meaning "IE is version 6 or 7" for the former, and "IE is less than version 8" (minus sign) for the latter. Which allows us to also have "index.ie=6,firefox=14.css", obviously.
If you want to provide support for a later version, which is less likely but whatever, you can do "index.opera+12.css" (ie Opera 12 and later.)
One of the drawbacks is that for now you can only provide a major version number, i.e. not "opera+12.5"... Which upsets me a bit because Opera usually adds their developer-centric features in .5 versions, while .0 versions are more user-centric.

Also, I wanted to use '>' and '<' keywords in this, but unfortunately they're not allowed by the filesystem it appears. ARGH. So I'm using '-' and '+' instead. '+' is alright, but '-' bothers me because people may want to add CSS suffixes like 'my-suffix'... Well, I guess I'll have to ensure these are accepted if what follows the '-' isn't a number.

So... Given the pros and cons of this new system, I just have one question to ask you guys:

Do you think it's good idea or I should just forget it?
4661
Features / Re: Virtual selectors in WeCSS
« on August 15th, 2012, 02:54 PM »
That's the thing, many say they read the changelog, but rarely if ever comment on it... :whistle:
I'm human. I like feedback -- whether positive or not!

So, I only have one bug left in virtuals -- I used a virtual on a certain tag, and it canceled it and all its children altogether. Hmm... (I'm so tired, I'll probably just leave it without a virtual keyword for now.)
4662
Features / Re: Virtual selectors in WeCSS
« on August 14th, 2012, 03:15 PM »
So... Fixed.

The problem wasn't with the virtuals themselves -- I realized that when I did tests on the current SVN and saw the same thing happened. Turned out my implementation was fine.
What wasn't fine, though, was the sorting function for $bases... Instead of returning a negative, zero or positive value, it returned only zero or 1 (a boolean). Considering that PHP has an "undefined" behavior when it receives 0, it's not a surprise that it didn't work perfectly. But even that wasn't the main issue -- the main issue was that I needed to sort (by length) not only the inherited elements, but also the elements that will inherit something... For that reason, in some situations we had a ".div .subdiv" element that was inherited from something, and ".div" from something else, and it would first stumble upon ".div", inherit it, and skip to the next element... Or something like that. Quite honestly, I didn't spend too much trying to figure it out, I just did the fixing, tested it, "seems to work", and I'm happy. I spent the better part of the week on that crap... -_-
Even got badly sick last night, probably due to the stress. Ended up going to bed before 9pm. Which is, like, the beginning of my work day sometimes... :^^;:

Anyway, it's all good now... Phew.
Now I've just got to fix alerts.. And confirms... And more CSS... And other things... All that without any feedback as usual... :P

I guess I'll just commit everything in one go -- because it's going to be one hell of a large commit. I don't even know whether it's worth documenting my commits... I think I'm the only one who cares about what I fix and stuff.

:edit: 9pm, not 9am... Changed that.
4663
Development blog / Re: Development, full speed ahead!
« on August 13th, 2012, 05:33 PM »
Quote from Arantor on August 13th, 2012, 04:20 PM
Because we wanted to make a difference. And because it wasn't ever really about the money.
Yeah it never was... But money can be an incentive to continue. Money can help pay for treating the cancer I'm likely to get in a few years from now (if it's not already too late) due to all the stress Wedge has generated in my life.

Anyway... I've rewritten WeCSS in a lot of ways. Now it also caches the browser version, even if not IE. It's a bit sad I know, but it's the only way I can safely enable/disable prefixes at will. (As of now, if you run wedge.org with the latest Opera 12.50 snapshot, none of the gradients will show up.)
I'm not even going to complain... I added a small script to automatically purge the filecache every month, so that older browser versions don't clutter the filesystem after being unused for months.
4664
Development blog / Re: Development, full speed ahead!
« on August 13th, 2012, 03:58 PM »
Quote from Arantor on August 13th, 2012, 03:21 PM
There is absolutely no way in hell I am going to do that. It's a recipe for being hacked.
Then we'll have to live with people who keep bugging us about upgrade paths...

Eh.

As if it's not already enough that I have to live with internal W3C wars that force me to rewrite WeCSS for days... -_-

God why did I start work on Wedge?! Why am I heading towards an OS license when we should really be selling it for a million dollars?!
4665
Development blog / Re: Development, full speed ahead!
« on August 13th, 2012, 10:44 AM »
Quote from Arantor on August 9th, 2012, 12:47 PM
That should be far less of an issue with Wedge because of the way plugins work. It could be made almost transparent with little or no real effort, too.
Yeah.
Technically, I think we could even get away with a webinstall if we provide a single PHP file to upload somewhere, and that will retrieve the latest files from our server and install them. That way, we can be sure the entire Wedge folder has the same rights as the PHP user... (Of course, updating files manually could then cause issues.)

Well, anyway I don't even know if Wedge will be released anyway. I spent my entire weekend fixing bugs and ended up making them worse. For instance, Opera had the fantastic idea of releasing a new alpha where CSS gradient prefixes are removed -- and support for the prefixed version is removed! Thank you guys, now I have to include both versions... -_- Anyway, as Opera updates itself automatically, once v12.50 is out it won't be much of a problem. When it comes to Firefox, though, v16+ removes the prefixes, but if you want to support both, it won't work: showing the prefixed version then the unprefixed version will fail altogether in v<16. Thankfully, they still support the prefixed version so I'm sticking to that one only for now...
Stupid browsers and incompatibilities.
Now it also shows that simply providing a '-prefix' variable in WeCSS isn't enough to warrant compatibility. Well, it COULD be enough, but it'd mean I have to add browser-specific files to disable some of the CSS that would make everything fail. That's stupid. So I rewrote the system to simplify it for users... And, of course, it doesn't work well. (Still working on it.)

Not only that, but my confirm() rewrite is stalled, as well as my virtual keyword bug.

I'm pretty much screwed these days.