Re: [xwiki-devs] [xwiki-notifications] r26284 - platform/skins/trunk/colibri/src/main/resources/colibri
First commit! Yeah :) Champagne! Some questions below (hey I couldn't left the first commit go without questions ;)) On Jan 21, 2010, at 4:24 PM, evalica (SVN) wrote:
Author: evalica Date: 2010-01-21 16:24:22 +0100 (Thu, 21 Jan 2010) New Revision: 26284
Modified: platform/skins/trunk/colibri/src/main/resources/colibri/colibri.css Log: XSCOLIBRI-180: Scroll and width problems on Stats space
Modified: platform/skins/trunk/colibri/src/main/resources/colibri/colibri.css =================================================================== --- platform/skins/trunk/colibri/src/main/resources/colibri/colibri.css 2010-01-21 14:52:45 UTC (rev 26283) +++ platform/skins/trunk/colibri/src/main/resources/colibri/colibri.css 2010-01-21 15:24:22 UTC (rev 26284) @@ -1316,7 +1316,7 @@ }
div.panellayoutcontainer-2col .panellayoutcol { - width: 50%; + width: 49%;
Where does this magic number come from? Is the 1% important? If so maybe this warrants some comment?
}
div.panellayoutcontainer-3col .panellayoutcol { @@ -1324,11 +1324,11 @@ }
div.panellayoutcontainer-4col .panellayoutcol { - width: 25%; + width: 24%;
same
}
div.panellayoutcontainer-5col .panellayoutcol { - width: 20%; + width: 19%;
same
}
div.panellayoutcontainer-1col, div.panellayoutcontainer-2col, div.panellayoutcontainer-3col, div.panellayoutcontainer-4col, div.panellayoutcontainer-5col { @@ -1339,15 +1339,13 @@ .panellayoutcol { float: left; height: 1%; - overflow: auto; - }
.panellayoutcol .panel { - border: 1px solid #ddd; - margin: 0 0 20px 5%; + border: 1px solid $theme.borderColor; + margin: 0 0 5% 5%; + overflow-x: auto; width: 90%; - }
#xwikicontent .panel ul {
Thanks -Vincent
On 01/21/2010 04:32 PM, Vincent Massol wrote:
First commit! Yeah :) Champagne!
Some questions below (hey I couldn't left the first commit go without questions ;))
On Jan 21, 2010, at 4:24 PM, evalica (SVN) wrote:
Author: evalica Date: 2010-01-21 16:24:22 +0100 (Thu, 21 Jan 2010) New Revision: 26284
Modified: platform/skins/trunk/colibri/src/main/resources/colibri/colibri.css Log: XSCOLIBRI-180: Scroll and width problems on Stats space
Modified: platform/skins/trunk/colibri/src/main/resources/colibri/colibri.css =================================================================== --- platform/skins/trunk/colibri/src/main/resources/colibri/colibri.css 2010-01-21 14:52:45 UTC (rev 26283) +++ platform/skins/trunk/colibri/src/main/resources/colibri/colibri.css 2010-01-21 15:24:22 UTC (rev 26284) @@ -1316,7 +1316,7 @@ }
div.panellayoutcontainer-2col .panellayoutcol { - width: 50%; + width: 49%;
Where does this magic number come from? Is the 1% important? If so maybe this warrants some comment?
There are rounding errors in IE, sometimes 50% + 50% = 101% -- Sergiu Dumitriu http://purl.org/net/sergiu/
On Jan 21, 2010, at 4:50 PM, Sergiu Dumitriu wrote:
On 01/21/2010 04:32 PM, Vincent Massol wrote:
First commit! Yeah :) Champagne!
Some questions below (hey I couldn't left the first commit go without questions ;))
On Jan 21, 2010, at 4:24 PM, evalica (SVN) wrote:
Author: evalica Date: 2010-01-21 16:24:22 +0100 (Thu, 21 Jan 2010) New Revision: 26284
Modified: platform/skins/trunk/colibri/src/main/resources/colibri/colibri.css Log: XSCOLIBRI-180: Scroll and width problems on Stats space
Modified: platform/skins/trunk/colibri/src/main/resources/colibri/colibri.css =================================================================== --- platform/skins/trunk/colibri/src/main/resources/colibri/colibri.css 2010-01-21 14:52:45 UTC (rev 26283) +++ platform/skins/trunk/colibri/src/main/resources/colibri/colibri.css 2010-01-21 15:24:22 UTC (rev 26284) @@ -1316,7 +1316,7 @@ }
div.panellayoutcontainer-2col .panellayoutcol { - width: 50%; + width: 49%;
Where does this magic number come from? Is the 1% important? If so maybe this warrants some comment?
There are rounding errors in IE, sometimes 50% + 50% = 101%
ok thanks. My question was more: shouldn't we comment it? Or is it more generic and in this case should it be decided as a general rule and put on dev.xwiki.org in the best practices section? Thanks -Vincent
This is not generic - this depends on the containers. We have plenty of working rules with 100%. On Thu, Jan 21, 2010 at 17:54, Vincent Massol <[email protected]> wrote:
On Jan 21, 2010, at 4:50 PM, Sergiu Dumitriu wrote:
On 01/21/2010 04:32 PM, Vincent Massol wrote:
First commit! Yeah :) Champagne!
Some questions below (hey I couldn't left the first commit go without questions ;))
On Jan 21, 2010, at 4:24 PM, evalica (SVN) wrote:
Author: evalica Date: 2010-01-21 16:24:22 +0100 (Thu, 21 Jan 2010) New Revision: 26284
Modified: platform/skins/trunk/colibri/src/main/resources/colibri/colibri.css Log: XSCOLIBRI-180: Scroll and width problems on Stats space
Modified: platform/skins/trunk/colibri/src/main/resources/colibri/colibri.css =================================================================== --- platform/skins/trunk/colibri/src/main/resources/colibri/colibri.css 2010-01-21 14:52:45 UTC (rev 26283) +++ platform/skins/trunk/colibri/src/main/resources/colibri/colibri.css 2010-01-21 15:24:22 UTC (rev 26284) @@ -1316,7 +1316,7 @@ }
div.panellayoutcontainer-2col .panellayoutcol { - width: 50%; + width: 49%;
Where does this magic number come from? Is the 1% important? If so maybe this warrants some comment?
There are rounding errors in IE, sometimes 50% + 50% = 101%
ok thanks. My question was more: shouldn't we comment it?
Or is it more generic and in this case should it be decided as a general rule and put on dev.xwiki.org in the best practices section?
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Jan 21, 2010, at 5:36 PM, Ecaterina Valica wrote:
This is not generic - this depends on the containers. We have plenty of working rules with 100%.
ok then I guess it means they should be commented. How will we remember the reason otherwise? (open question) Thanks -Vincent
On Thu, Jan 21, 2010 at 17:54, Vincent Massol <[email protected]> wrote:
On Jan 21, 2010, at 4:50 PM, Sergiu Dumitriu wrote:
On 01/21/2010 04:32 PM, Vincent Massol wrote:
First commit! Yeah :) Champagne!
Some questions below (hey I couldn't left the first commit go without questions ;))
On Jan 21, 2010, at 4:24 PM, evalica (SVN) wrote:
Author: evalica Date: 2010-01-21 16:24:22 +0100 (Thu, 21 Jan 2010) New Revision: 26284
Modified: platform/skins/trunk/colibri/src/main/resources/colibri/colibri.css Log: XSCOLIBRI-180: Scroll and width problems on Stats space
Modified: platform/skins/trunk/colibri/src/main/resources/colibri/colibri.css =================================================================== --- platform/skins/trunk/colibri/src/main/resources/colibri/colibri.css 2010-01-21 14:52:45 UTC (rev 26283) +++ platform/skins/trunk/colibri/src/main/resources/colibri/colibri.css 2010-01-21 15:24:22 UTC (rev 26284) @@ -1316,7 +1316,7 @@ }
div.panellayoutcontainer-2col .panellayoutcol { - width: 50%; + width: 49%;
Where does this magic number come from? Is the 1% important? If so maybe this warrants some comment?
There are rounding errors in IE, sometimes 50% + 50% = 101%
ok thanks. My question was more: shouldn't we comment it?
Or is it more generic and in this case should it be decided as a general rule and put on dev.xwiki.org in the best practices section?
Thanks -Vincent
On 01/21/2010 05:42 PM, Vincent Massol wrote:
On Jan 21, 2010, at 5:36 PM, Ecaterina Valica wrote:
This is not generic - this depends on the containers. We have plenty of working rules with 100%.
ok then I guess it means they should be commented. How will we remember the reason otherwise? (open question)
We (CSS developers) just do.
Thanks -Vincent
On Thu, Jan 21, 2010 at 17:54, Vincent Massol<[email protected]> wrote:
On Jan 21, 2010, at 4:50 PM, Sergiu Dumitriu wrote:
On 01/21/2010 04:32 PM, Vincent Massol wrote:
First commit! Yeah :) Champagne!
Some questions below (hey I couldn't left the first commit go without questions ;))
On Jan 21, 2010, at 4:24 PM, evalica (SVN) wrote:
Author: evalica Date: 2010-01-21 16:24:22 +0100 (Thu, 21 Jan 2010) New Revision: 26284
Modified: platform/skins/trunk/colibri/src/main/resources/colibri/colibri.css Log: XSCOLIBRI-180: Scroll and width problems on Stats space
Modified: platform/skins/trunk/colibri/src/main/resources/colibri/colibri.css =================================================================== --- platform/skins/trunk/colibri/src/main/resources/colibri/colibri.css 2010-01-21 14:52:45 UTC (rev 26283) +++ platform/skins/trunk/colibri/src/main/resources/colibri/colibri.css 2010-01-21 15:24:22 UTC (rev 26284) @@ -1316,7 +1316,7 @@ }
div.panellayoutcontainer-2col .panellayoutcol { - width: 50%; + width: 49%;
Where does this magic number come from? Is the 1% important? If so maybe this warrants some comment?
There are rounding errors in IE, sometimes 50% + 50% = 101%
ok thanks. My question was more: shouldn't we comment it?
Or is it more generic and in this case should it be decided as a general rule and put on dev.xwiki.org in the best practices section?
Thanks -Vincent
-- Sergiu Dumitriu http://purl.org/net/sergiu/
On Jan 21, 2010, at 5:52 PM, Sergiu Dumitriu wrote:
On 01/21/2010 05:42 PM, Vincent Massol wrote:
On Jan 21, 2010, at 5:36 PM, Ecaterina Valica wrote:
This is not generic - this depends on the containers. We have plenty of working rules with 100%.
ok then I guess it means they should be commented. How will we remember the reason otherwise? (open question)
We (CSS developers) just do.
If I understand correctly you're saying that this is so standard that it's self documenting. Tomorrow if a new CSS committer comes in, he'll have no pb understanding and he'll not put back the values to round numbers asking himself why the person didn't do that in the first place? Thanks -Vincent PS: We comment for code. I wonder why we don't do that for CSS too. There are some comments but not much.
On Thu, Jan 21, 2010 at 17:54, Vincent Massol<[email protected]> wrote:
On Jan 21, 2010, at 4:50 PM, Sergiu Dumitriu wrote:
On 01/21/2010 04:32 PM, Vincent Massol wrote:
First commit! Yeah :) Champagne!
Some questions below (hey I couldn't left the first commit go without questions ;))
On Jan 21, 2010, at 4:24 PM, evalica (SVN) wrote:
> Author: evalica > Date: 2010-01-21 16:24:22 +0100 (Thu, 21 Jan 2010) > New Revision: 26284 > > Modified: > platform/skins/trunk/colibri/src/main/resources/colibri/colibri.css > Log: > XSCOLIBRI-180: Scroll and width problems on Stats space > > Modified: platform/skins/trunk/colibri/src/main/resources/colibri/colibri.css > =================================================================== > --- platform/skins/trunk/colibri/src/main/resources/colibri/colibri.css 2010-01-21 14:52:45 UTC (rev 26283) > +++ platform/skins/trunk/colibri/src/main/resources/colibri/colibri.css 2010-01-21 15:24:22 UTC (rev 26284) > @@ -1316,7 +1316,7 @@ > } > > div.panellayoutcontainer-2col .panellayoutcol { > - width: 50%; > + width: 49%;
Where does this magic number come from? Is the 1% important? If so maybe this warrants some comment?
There are rounding errors in IE, sometimes 50% + 50% = 101%
ok thanks. My question was more: shouldn't we comment it?
Or is it more generic and in this case should it be decided as a general rule and put on dev.xwiki.org in the best practices section?
Thanks -Vincent
If we want to have more comments in the CSS we should use a minimizer for the CSS, so that they are removed (along with the spaces) from the version we serve to the client. Some CSS files we have already do this. Another problem with CSS is that we add / modify some rules to assure compatibility with some specific browser. A solution would be to have specific files (just like the one we have for IE6) for the browsers that need those properties, so that we don't have to comment on every lines what compatibility is used for. Having multiple files that do the same thing can be hard to manage and sometimes browsers share behavior (depending on the engine). Ex: In the patch above the scrolling was only for Chrome and Safari. And the big problem in my opinion is that rules come in packages. To fix one bug you would need to comment a line in a class that is dependent to a line from another class, etc, etc. Ex: In the patch above the widths matter because of the float:left. Plus the cascading inheritance behavior of CSS. Right now we use comments in CSS to group properties, to specify overriding, to specify the browser that needs the property or to mark the hack.
Another observations is that even if we had comments in the CSS, the only way to see them is through a text editor, tools like Firebug don't even show them while inspecting.
On Jan 21, 2010, at 8:43 PM, Ecaterina Valica wrote:
Another observations is that even if we had comments in the CSS, the only way to see them is through a text editor, tools like Firebug don't even show them while inspecting.
Not sure I understand what you mean... Java comments are not seen by users either.... they're not meant for that. Thanks -Vincent
All I know is that I see regularly regressions when devs touch the CSS and one reason I believe is because CSS files are not commented so you don't know why something was done in a given way and you change it, thus breaking some other part. I have touched the CSS several times too and I know I was very uncomfortable every time since I didn't know where what I was touching was used and what were the rules governing what I was touching. Maybe there are ways to write unit tests for CSS and if that existed it would be even better than commenting I agree (even though comments would still be needed to explain why something is done in given manner). Thanks -Vincent On Jan 21, 2010, at 8:36 PM, Ecaterina Valica wrote:
If we want to have more comments in the CSS we should use a minimizer for the CSS, so that they are removed (along with the spaces) from the version we serve to the client. Some CSS files we have already do this.
Another problem with CSS is that we add / modify some rules to assure compatibility with some specific browser. A solution would be to have specific files (just like the one we have for IE6) for the browsers that need those properties, so that we don't have to comment on every lines what compatibility is used for. Having multiple files that do the same thing can be hard to manage and sometimes browsers share behavior (depending on the engine). Ex: In the patch above the scrolling was only for Chrome and Safari.
And the big problem in my opinion is that rules come in packages. To fix one bug you would need to comment a line in a class that is dependent to a line from another class, etc, etc. Ex: In the patch above the widths matter because of the float:left. Plus the cascading inheritance behavior of CSS.
Right now we use comments in CSS to group properties, to specify overriding, to specify the browser that needs the property or to mark the hack.
On 01/21/2010 09:04 PM, Vincent Massol wrote:
All I know is that I see regularly regressions when devs touch the CSS and one reason I believe is because CSS files are not commented so you don't know why something was done in a given way and you change it, thus breaking some other part.
I doubt that the lack of comments is the cause of more than 2% of all the skin regressions that occurred. To bring the problem on a more familiar ground, imagine that you would have to change some program made of global variables, and not just that, global structs with overlapping memory zones. And there are 300 such variables. What amount of comments would you think would be enough to guarantee that somebody new to the program won't accidentally break something? Commenting the 49% is like commenting that one of the variables of such a global overlapping minefield, called MAX_NUMBER, should have a positive value. This is how CSS works. The very nature of selectors make it almost impossible to know what exactly will be side-affected when applied to a real HTML.
I have touched the CSS several times too and I know I was very uncomfortable every time since I didn't know where what I was touching was used and what were the rules governing what I was touching.
Maybe there are ways to write unit tests for CSS and if that existed it would be even better than commenting I agree (even though comments would still be needed to explain why something is done in given manner).
Thanks -Vincent
On Jan 21, 2010, at 8:36 PM, Ecaterina Valica wrote:
If we want to have more comments in the CSS we should use a minimizer for the CSS, so that they are removed (along with the spaces) from the version we serve to the client. Some CSS files we have already do this.
Another problem with CSS is that we add / modify some rules to assure compatibility with some specific browser. A solution would be to have specific files (just like the one we have for IE6) for the browsers that need those properties, so that we don't have to comment on every lines what compatibility is used for. Having multiple files that do the same thing can be hard to manage and sometimes browsers share behavior (depending on the engine). Ex: In the patch above the scrolling was only for Chrome and Safari.
And the big problem in my opinion is that rules come in packages. To fix one bug you would need to comment a line in a class that is dependent to a line from another class, etc, etc. Ex: In the patch above the widths matter because of the float:left. Plus the cascading inheritance behavior of CSS.
Right now we use comments in CSS to group properties, to specify overriding, to specify the browser that needs the property or to mark the hack.
-- Sergiu Dumitriu http://purl.org/net/sergiu/
On Feb 2, 2010, at 9:42 PM, Sergiu Dumitriu wrote:
On 01/21/2010 09:04 PM, Vincent Massol wrote:
All I know is that I see regularly regressions when devs touch the CSS and one reason I believe is because CSS files are not commented so you don't know why something was done in a given way and you change it, thus breaking some other part.
I doubt that the lack of comments is the cause of more than 2% of all the skin regressions that occurred. To bring the problem on a more familiar ground, imagine that you would have to change some program made of global variables, and not just that, global structs with overlapping memory zones. And there are 300 such variables. What amount of comments would you think would be enough to guarantee that somebody new to the program won't accidentally break something? Commenting the 49% is like commenting that one of the variables of such a global overlapping minefield, called MAX_NUMBER, should have a positive value.
This is how CSS works. The very nature of selectors make it almost impossible to know what exactly will be side-affected when applied to a real HTML.
I'm not focused on comment. What I'd like is that we find ways to reduce regressions. Whenever I see some CSS change I cringe since I have no clue what's going to break. For example JV changes some CSS today to fix an issue. I couldn't help but wonder in my head is this wasn't going to break some other place. It's probably due to the fact that I don't have a visual representation in my head about how the different parts of our CSS affects different parts of the default XE. In java code we have found ways to cope with this: - comments - automated tests - compartimented design (OO design) I wonder if there are ways to improve our resistance to regression on the CSS side, and that we could put as best practices. I don't often change CSS but when I do (or anyone else for that matter), I'd like some assurance that I'm not breaking something elsewhere (that breaks through complex rules of inheritance or reuse of the same class id, etc). Thanks -Vincent
I have touched the CSS several times too and I know I was very uncomfortable every time since I didn't know where what I was touching was used and what were the rules governing what I was touching.
Maybe there are ways to write unit tests for CSS and if that existed it would be even better than commenting I agree (even though comments would still be needed to explain why something is done in given manner).
Thanks -Vincent
On Jan 21, 2010, at 8:36 PM, Ecaterina Valica wrote:
If we want to have more comments in the CSS we should use a minimizer for the CSS, so that they are removed (along with the spaces) from the version we serve to the client. Some CSS files we have already do this.
Another problem with CSS is that we add / modify some rules to assure compatibility with some specific browser. A solution would be to have specific files (just like the one we have for IE6) for the browsers that need those properties, so that we don't have to comment on every lines what compatibility is used for. Having multiple files that do the same thing can be hard to manage and sometimes browsers share behavior (depending on the engine). Ex: In the patch above the scrolling was only for Chrome and Safari.
And the big problem in my opinion is that rules come in packages. To fix one bug you would need to comment a line in a class that is dependent to a line from another class, etc, etc. Ex: In the patch above the widths matter because of the float:left. Plus the cascading inheritance behavior of CSS.
Right now we use comments in CSS to group properties, to specify overriding, to specify the browser that needs the property or to mark the hack.
On 02/02/2010 09:53 PM, Vincent Massol wrote:
On Feb 2, 2010, at 9:42 PM, Sergiu Dumitriu wrote:
On 01/21/2010 09:04 PM, Vincent Massol wrote:
All I know is that I see regularly regressions when devs touch the CSS and one reason I believe is because CSS files are not commented so you don't know why something was done in a given way and you change it, thus breaking some other part.
I doubt that the lack of comments is the cause of more than 2% of all the skin regressions that occurred. To bring the problem on a more familiar ground, imagine that you would have to change some program made of global variables, and not just that, global structs with overlapping memory zones. And there are 300 such variables. What amount of comments would you think would be enough to guarantee that somebody new to the program won't accidentally break something? Commenting the 49% is like commenting that one of the variables of such a global overlapping minefield, called MAX_NUMBER, should have a positive value.
This is how CSS works. The very nature of selectors make it almost impossible to know what exactly will be side-affected when applied to a real HTML.
I'm not focused on comment. What I'd like is that we find ways to reduce regressions.
Whenever I see some CSS change I cringe since I have no clue what's going to break. For example JV changes some CSS today to fix an issue. I couldn't help but wonder in my head is this wasn't going to break some other place. It's probably due to the fact that I don't have a visual representation in my head about how the different parts of our CSS affects different parts of the default XE.
In java code we have found ways to cope with this: - comments - automated tests - compartimented design (OO design)
I wonder if there are ways to improve our resistance to regression on the CSS side, and that we could put as best practices.
Not all CSS is inherently unstable, just the one we have so far. This is the main reason why I'm pushing for a clean skin that doesn't inherit the fragility from Dodo + the fragility from Albatross + the fragility from Toucan. We're responsible for the degree of overlapiness. So far, we've made the CSS a jungle. The Colibri cleanup helped here. What can be done to ensure a side-effect free CSS: - make sure the selectors are specific enough not to have unpredicted side effects - make sure the selectors are generic enough so that they continue to work when the targeted content is in a slightly different position, and they allow a new element to reuse these styles - standardize and document z-indexes - try to reuse existing styles as much as possible (reusing classname, accepting inherited styles if they are good enough instead of always overriding everything just for a little touch of personality) - reduce hacks - use !important sparingly
I don't often change CSS but when I do (or anyone else for that matter), I'd like some assurance that I'm not breaking something elsewhere (that breaks through complex rules of inheritance or reuse of the same class id, etc).
Thanks -Vincent
I have touched the CSS several times too and I know I was very uncomfortable every time since I didn't know where what I was touching was used and what were the rules governing what I was touching.
Maybe there are ways to write unit tests for CSS and if that existed it would be even better than commenting I agree (even though comments would still be needed to explain why something is done in given manner).
Thanks -Vincent
On Jan 21, 2010, at 8:36 PM, Ecaterina Valica wrote:
If we want to have more comments in the CSS we should use a minimizer for the CSS, so that they are removed (along with the spaces) from the version we serve to the client. Some CSS files we have already do this.
Another problem with CSS is that we add / modify some rules to assure compatibility with some specific browser. A solution would be to have specific files (just like the one we have for IE6) for the browsers that need those properties, so that we don't have to comment on every lines what compatibility is used for. Having multiple files that do the same thing can be hard to manage and sometimes browsers share behavior (depending on the engine). Ex: In the patch above the scrolling was only for Chrome and Safari.
And the big problem in my opinion is that rules come in packages. To fix one bug you would need to comment a line in a class that is dependent to a line from another class, etc, etc. Ex: In the patch above the widths matter because of the float:left. Plus the cascading inheritance behavior of CSS.
Right now we use comments in CSS to group properties, to specify overriding, to specify the browser that needs the property or to mark the hack.
-- Sergiu Dumitriu http://purl.org/net/sergiu/
Because some browsers take width property differently regarding to their parent and also some include the padding/margin values. Also sometimes the divs go just 1px outside because of the borders. Depends on the situation and browser. Having 99% instead of 100% accommodates this case.
participants (3)
-
Ecaterina Valica -
Sergiu Dumitriu -
Vincent Massol