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.
4711
Features / Re: New revs
« on July 28th, 2012, 05:12 PM »
rev 1649
(6 files, 3kb)
* Cleaned up reqWin, removed desiredHeight and asWindow params which were no longer in common use. (Install.language.php, Packages.template.php, captcha.js, editor.js, script.js)
* Cleaned up weUrl() as well, removing the fallback for empty urls (if you need to get the URL with no param, just pass an empty string), and the extra test that made sure to add a semi-colon -- which, as far as my tests show, would never happen in any situation. (script.js)
* While doing a documentation search on something else, I noticed the $.now() function in jQuery. This compresses even better than '+new Date', which was my beloved trick for saving space compared to the ugly '(new Date()).getTime()' that jQuery also uses. Well, I can't rewrite jQuery (maybe I should!), so I'll have to use that, but if you don't use jQuery, try and remember to use '+new Date', because it rocks. (script.js)
@ BTW, the rgb2hex optimization from last rev saved nearly 20 gzipped bytes (about 60 non-gzipped), which was better than I hoped for. :)
(6 files, 3kb)
* Cleaned up reqWin, removed desiredHeight and asWindow params which were no longer in common use. (Install.language.php, Packages.template.php, captcha.js, editor.js, script.js)
* Cleaned up weUrl() as well, removing the fallback for empty urls (if you need to get the URL with no param, just pass an empty string), and the extra test that made sure to add a semi-colon -- which, as far as my tests show, would never happen in any situation. (script.js)
* While doing a documentation search on something else, I noticed the $.now() function in jQuery. This compresses even better than '+new Date', which was my beloved trick for saving space compared to the ugly '(new Date()).getTime()' that jQuery also uses. Well, I can't rewrite jQuery (maybe I should!), so I'll have to use that, but if you don't use jQuery, try and remember to use '+new Date', because it rocks. (script.js)
@ BTW, the rgb2hex optimization from last rev saved nearly 20 gzipped bytes (about 60 non-gzipped), which was better than I hoped for. :)
4712
Features / Re: New revs
« on July 28th, 2012, 11:49 AM »
rev 1648
(5 files, 4kb)
+ Added an internal rgb2hex function in WeCSS. It makes it easier to return a #rgb value for CSS while compressing it if possible (#fc9 instead of #ffcc99). (Class-CSS.php)
! It is with great sadness that I'm hereby forced to allow selectors to start with a digit, while it conflicts with the basics of CSS. It's not my fault that they allow these for @-keyframes declarations. (Class-CSS.php)
+ Added support for the 'fr' value (fraction) in the math() function. I doubt anyone will ever need to use math(2fr * 3fr), but whatever! (Class-CSS.php)
! Partially reverted rev 1143's IE9 fixes for gradients. While it did fix gradients, it also completely deleted rgba() declarations from IE9 files. The new fix should be the best of both worlds... (Class-CSS.php)
* Renamed signature_minposts language string to signature_needs_posts, to avoid conflicts in the admin search. (Profile-Modify.php, Profile.language.php)
! Fixed title icon alignment in Recent page. (Recent.template.php)
(5 files, 4kb)
+ Added an internal rgb2hex function in WeCSS. It makes it easier to return a #rgb value for CSS while compressing it if possible (#fc9 instead of #ffcc99). (Class-CSS.php)
! It is with great sadness that I'm hereby forced to allow selectors to start with a digit, while it conflicts with the basics of CSS. It's not my fault that they allow these for @-keyframes declarations. (Class-CSS.php)
+ Added support for the 'fr' value (fraction) in the math() function. I doubt anyone will ever need to use math(2fr * 3fr), but whatever! (Class-CSS.php)
! Partially reverted rev 1143's IE9 fixes for gradients. While it did fix gradients, it also completely deleted rgba() declarations from IE9 files. The new fix should be the best of both worlds... (Class-CSS.php)
* Renamed signature_minposts language string to signature_needs_posts, to avoid conflicts in the admin search. (Profile-Modify.php, Profile.language.php)
! Fixed title icon alignment in Recent page. (Recent.template.php)
4713
I'd personally prefer to run with the from/to syntax, that's nicer to read. What's the standard say? (I can't remember what the standard says)
The reality is, you can define more keyframes, e.g. at 0%, 25%, 57.5%, 100%... So it's not like I can prevent themers from using numbers.
I also think it would be better to not support it because there is a certain nicety around keeping things clean - and being less strict does tend to make it less clean.
But it'd either make it slower to parse, or just impossible. (I'm a bit rusty when it comes to dealing with selector parsing. WeCSS is a fine work of art but I'm always on the verge of forgetting about its internals... And I'm not even sure documenting it further would help, ah ah.)
4714
The Pub / Re: Only display 'Redirect boards' when there actually are any
« on July 27th, 2012, 05:33 PM »Actually, I was debating going one step further. I agree that default board state icons per board type would be good, but what if we provided the option for different templates for displaying in the board index?
Posted: July 27th, 2012, 05:29 PM
I think SMF was trying to head in this direction as you can choose different templates per board, but having different templates per area within a main template is more appealing then the mess of installing multiple templates just to use a message template from it.
Maybe even better is to split the template sections up into groups where each section of a template is selectable. Say you can release a template but it may contain a few files for the post display. Maybe these can be stored in a main template that only contains minor templates that modify little stuff and rely on a main templates CSS for styling or maybe the minor template can have its own CSS which it specifies the system to load with the main template.
We have yet to delve[1] further into it, it's pretty much done for per-page templating, but it's very much doable for per-board (or per-topic) templating as well... Which, of course, we'll eventually do.
| 1. | Always thought it was spelled 'dwelve'... |
4715
Features / Re: Virtual selectors in WeCSS
« on July 27th, 2012, 12:22 PM »For 3), call it virtual, it's not abstract by definition. As far as large mixins go, as long as we don't ourselves use anything too massive I don't really see a problem. I don't see us including base64 stuff in the main file - and we're not responsible for keeping themers super-efficient. (As it is, WeCSS deals with things a lot better than SMF anyway)
However, because .windowbg is usually used directly into the HTML markup (because of historical SMF guidelines), it's one of the few 'exceptions' to the class extension rules. (Along with .smalltext etc.)
This is the kind of class that won't find itself moved to the common.css file ;)
windowbg is a special case because it has no right home, it's not quite either mixin/extends nor OOCSS because it's both stylistic and semantic. It's like we need to split it up into its roles and have windowbg simply extend that.
Yeah, it could be a possibility, too.
Just like I made my own postbg and postbg2 for posts, where SMF only uses windowbg and windowbg2.
4716
Archived fixes / Re: sb refresh does not update scrollbar
« on July 27th, 2012, 09:10 AM »
Err... Yes?
4717
Off-topic / Re: The Dark Knight Rises
« on July 26th, 2012, 04:29 PM »
Apparently no one. Wedge users are pragmatic, they don't want to risk their life for a movie. :P
I personally loved TDK, bought the BluRay but never watched it again. The only (only!) reason I might want to see it ASAP, is because I don't want to read any spoilers in the meantime...
I personally loved TDK, bought the BluRay but never watched it again. The only (only!) reason I might want to see it ASAP, is because I don't want to read any spoilers in the meantime...
4718
Archived fixes / Re: Admin search issues
« on July 26th, 2012, 04:28 PM »
Should be good now...
4719
Features / Re: Github & stuff
« on July 26th, 2012, 04:24 PM »I just now found out that you can stage a chunk or even a single line of a file in Git :D That is so awesome!
In my diff file -> open file (from the side I want to modify)
Back to the diff file -> on each line I don't want to commit, I just click the corresponding button to revert the line.
Now save.
Back to the opened file - in Notepad2 I get a notice "File modified, do you want to save?". I say no... Then I just press Space then Backspace, to remind me that it's a modified file.
Commit.
Back to opened filed. Save. Done...
Really, it's how I do it. Otherwise, I'd never been committing anything...
4720
Archived fixes / Re: sb refresh does not update scrollbar
« on July 26th, 2012, 04:21 PM »
I'd really appreciate being given a clear test case for this... ;)
4721
Archived fixes / SMF (not Wedge) bugs
« on July 26th, 2012, 04:19 PM »
I'll just have this topic around in case I find a bug that's in SMF but not in Wedge...
Well, in the case of this particular bug, which is not really a bug per se, I'm currently trying to rewrite the template so it's unlikely I'll even remember about the bug by the time I commit, so here it is, for SMF developers to fix...
Code: [Select]
That's in Search.template.php ;)
Well, in the case of this particular bug, which is not really a bug per se, I'm currently trying to rewrite the template so it's unlikely I'll even remember about the bug by the time I commit, so here it is, for SMF developers to fix...
<div class="verification>That's in Search.template.php ;)
4722
Features / Re: Virtual selectors in WeCSS
« on July 26th, 2012, 12:55 PM »
The downsides of 1 are that:
- plugin authors may be at a loss when they attempt to inherit from .inline-block in their custom CSS when 'it works perfectly when editing index.css'...
- philosophical conflict. See below.
The downsides of 3 are that:
- we have to ensure we don't use abstract (or virtual, what would be best?) selectors in the HTML, and we need to convert existing uses to classes (which isn't that bothersome.)
- if we use a 'large' mixin or extend in the common.css file (for example by including a base64-encoded image in the class), you have to keep in mind that both the final gzipped 'index.css' and 'my-plugin.css' files will include the image, which is a total, complete and absolute waste of space, and something kind of scary in the end.
And, on a higher level, it's basically a fight to the death between the SASS philosophy (mixins and extends for the win, every HTML div has its own custom class) and Nicole Sullivan's OOCSS methodology (https://github.com/stubbornella/oocss/wiki/), where every class is an 'object' with a single role and you need to accumulate classes on your divs to give them the shape/role you want.
I'm of the opinion that both philosophies have their pros and cons, and can actually be adopted either way. I like them both.
However, because WeCSS went into the direction of class extensions, it's hard to justify not keeping to that method through the end.
As such, I'd recommend going with virtual keywords and using a common.css file for inline blocks, windowbg and any other elements that may regularly be inherited by others.
Now, there remains the case of windowbg (and probably other classes), where most of our templates specifically indicate they want windowbg as their base on this or that div, and then add other styles to it. This, in essence, is OOCSS and while it's still compatible with WeCSS, it feels 'wrong' to have it.
I guess that, before asking about virtual selectors, I should have asked to discuss the conflicting philosophies of CSS objects, and whether or not we should bother about them... ;)
- plugin authors may be at a loss when they attempt to inherit from .inline-block in their custom CSS when 'it works perfectly when editing index.css'...
- philosophical conflict. See below.
The downsides of 3 are that:
- we have to ensure we don't use abstract (or virtual, what would be best?) selectors in the HTML, and we need to convert existing uses to classes (which isn't that bothersome.)
- if we use a 'large' mixin or extend in the common.css file (for example by including a base64-encoded image in the class), you have to keep in mind that both the final gzipped 'index.css' and 'my-plugin.css' files will include the image, which is a total, complete and absolute waste of space, and something kind of scary in the end.
And, on a higher level, it's basically a fight to the death between the SASS philosophy (mixins and extends for the win, every HTML div has its own custom class) and Nicole Sullivan's OOCSS methodology (https://github.com/stubbornella/oocss/wiki/), where every class is an 'object' with a single role and you need to accumulate classes on your divs to give them the shape/role you want.
I'm of the opinion that both philosophies have their pros and cons, and can actually be adopted either way. I like them both.
However, because WeCSS went into the direction of class extensions, it's hard to justify not keeping to that method through the end.
As such, I'd recommend going with virtual keywords and using a common.css file for inline blocks, windowbg and any other elements that may regularly be inherited by others.
Now, there remains the case of windowbg (and probably other classes), where most of our templates specifically indicate they want windowbg as their base on this or that div, and then add other styles to it. This, in essence, is OOCSS and while it's still compatible with WeCSS, it feels 'wrong' to have it.
I guess that, before asking about virtual selectors, I should have asked to discuss the conflicting philosophies of CSS objects, and whether or not we should bother about them... ;)
4723
I can't imagine anything that would specifically upset WeCSS in this, and honestly if it were reformatted to use normal WeCSS layout it should work just fine.
Because of that, they fail to be compiled by Wedge because rules are expected to NOT start with a digit.
So I had a choice between (1) only accepting digits when inside a keyframe (which forces me to change the way I parse the file), or (2) accepting digits. I chose (2) because I'm fucking lazy. It works now.
Although the CSS is quite large for something so small, I like it overall.
Posted: July 16th, 2012, 10:05 PM
Was wondering... I haven't yet committed my changes to Class-CSS on this, because it feels 'wrong' to accept digits in my regex when normally they're not allowed at the beginning of a selector. (Except, as pointed out, in keyframe definitions.)
Should I just deal with it and add support...?
4724
Features / Virtual selectors in WeCSS
« on July 25th, 2012, 05:22 PM »
So, I was considering a new feature that I'll add to WeCSS, and need to get some thoughts on it first...
Let's consider this new keyword, 'virtual' (always in line with the C++/Delphi naming scheme.)
.inline-block virtual
display: inline-block
blablabla...
Now, the idea is that if a selector is found that has the virtual keyword, at the end of the pre-processing stage, Wedge will run a check for the selector, and delete it from all selector combinations (i.e. .inline-block, .windowbg, .windowbg2 will just become .windowbg, .windowbg2).
Additionally, if it's found to be alone (i.e. no other selectors extend it), it will simply delete it. Thus allowing me to create a 'virtual.css' or 'common.css' file with all of the nice little helpers like this one, and add it silently at the beginning of all files, which in turns allows us to use "extends .inline-block" everywhere, including external CSS files not related to the main file.
I think it's a pretty good idea, but this is where it gets tricky: there are a few rare situations where "inline-block" is used as a proper class in the HTML -- notably in the admin homepage, where it's also associated with admin_menu (making it easy to remove it... Just extend it!), the profile template (can add a custom class to that one), and the plugin manager (same here, will need an extra class.)
So, I'm wondering what's best?
1/ just forget about that keyword, and keep allowing the HTML to use virtual selectors.
2/ use it, but don't delete the selector afterwards... (which makes it pretty much useless, ah ah :))
3/ use it, and always delete the selector, and force the HTML to inherit from the selectors instead of using them.
Let's consider this new keyword, 'virtual' (always in line with the C++/Delphi naming scheme.)
.inline-block virtual
display: inline-block
blablabla...
Now, the idea is that if a selector is found that has the virtual keyword, at the end of the pre-processing stage, Wedge will run a check for the selector, and delete it from all selector combinations (i.e. .inline-block, .windowbg, .windowbg2 will just become .windowbg, .windowbg2).
Additionally, if it's found to be alone (i.e. no other selectors extend it), it will simply delete it. Thus allowing me to create a 'virtual.css' or 'common.css' file with all of the nice little helpers like this one, and add it silently at the beginning of all files, which in turns allows us to use "extends .inline-block" everywhere, including external CSS files not related to the main file.
I think it's a pretty good idea, but this is where it gets tricky: there are a few rare situations where "inline-block" is used as a proper class in the HTML -- notably in the admin homepage, where it's also associated with admin_menu (making it easy to remove it... Just extend it!), the profile template (can add a custom class to that one), and the plugin manager (same here, will need an extra class.)
So, I'm wondering what's best?
1/ just forget about that keyword, and keep allowing the HTML to use virtual selectors.
2/ use it, but don't delete the selector afterwards... (which makes it pretty much useless, ah ah :))
3/ use it, and always delete the selector, and force the HTML to inherit from the selectors instead of using them.
4725
Features / Re: New revs
« on July 24th, 2012, 11:10 PM »
rev 1647
(6 files +2-2, 9kb)
* Replaced boardstatus system with a single icon with different opacities according to the board type (on, off, redirect). This saves about a kilobyte off the main gzipped CSS file, and paves the way for custom board icons taken from the media area. Removed the legend because it sucked, and added titles to redirect board icons. Decided to get rid of the on/new differences because basically if a sub-board has new posts, a 'new' icon will show up for it anyway, no need to change the parent's status icon. (boardicon.png, boardstatus.png, boardstatus-ie6.png, Boards.template.php, MessageIndex.template.php, index.ie6.css, sections.css)
! Fixed a couple of bugs in the Groups page, which could cause a server crash and/or menu errors. Don't ask, I have no idea. (Groups.php, Subs.php)
(6 files +2-2, 9kb)
* Replaced boardstatus system with a single icon with different opacities according to the board type (on, off, redirect). This saves about a kilobyte off the main gzipped CSS file, and paves the way for custom board icons taken from the media area. Removed the legend because it sucked, and added titles to redirect board icons. Decided to get rid of the on/new differences because basically if a sub-board has new posts, a 'new' icon will show up for it anyway, no need to change the parent's status icon. (boardicon.png, boardstatus.png, boardstatus-ie6.png, Boards.template.php, MessageIndex.template.php, index.ie6.css, sections.css)
! Fixed a couple of bugs in the Groups page, which could cause a server crash and/or menu errors. Don't ask, I have no idea. (Groups.php, Subs.php)