That trumps .c2 or .c1 because it's more specific, but the cascade order would still apply:
.c2.c1 {width:20px} .c1.c2 {width:30px} On Tue, Oct 1, 2013 at 4:15 PM, Tom Livingston <tom...@gmail.com> wrote: > Sorry... > > correction: > > .c2.c1{width: 20px} > > ? > > On Tue, Oct 1, 2013 at 4:15 PM, Tom Livingston <tom...@gmail.com> wrote: > > What about: > > > > c2.c1{width: 20px} > > > > ? > > > > On Tue, Oct 1, 2013 at 2:55 PM, Chris Rockwell <ch...@chrisrockwell.com> > wrote: > >> That is why it works that way, yes. > >> > >> The engine sees two widths, both with the same weight, origin and > >> specificity; the last one to be declared will win. > >> > >> If instead, you did: > >> > >> div.c1 {width:20em} > >> .c2 {width:30em} > >> > >> The width would be 20em, because div.c1 is more specific. > >> > >> > >> On Tue, Oct 1, 2013 at 2:51 PM, Philip Taylor <p.tay...@rhul.ac.uk> > wrote: > >> > >>> > >>> > >>> Chris Rockwell wrote: > >>> > >>> > http://www.w3.org/TR/CSS2/cascade.html#cascading-order > >>> > > >>> > In your example, width is 30em; > >>> > >>> > How you assign them in the class attribute has no bearing. > >>> > >>> OK, so in particular you are referencing this part, I assume : > >>> > >>> > Finally, sort by order specified: if two declarations have the same > >>> weight, origin and specificity, the latter specified wins. > Declarations in > >>> imported style sheets are considered to be before any declarations in > the > >>> style sheet itself. > >>> > >>> Is that correct, Chris ? > >>> Philip Taylor > >>> > >> > >> > >> > >> -- > >> Chris Rockwell > >> ______________________________________________________________________ > >> css-discuss [css-d@lists.css-discuss.org] > >> http://www.css-discuss.org/mailman/listinfo/css-d > >> List wiki/FAQ -- http://css-discuss.incutio.com/ > >> List policies -- http://css-discuss.org/policies.html > >> Supported by evolt.org -- http://www.evolt.org/help_support_evolt/ > > > > > > > > -- > > > > Tom Livingston | Senior Front-End Developer | Media Logic | > > ph: 518.456.3015x231 | fx: 518.456.4279 | mlinc.com > > > > -- > > Tom Livingston | Senior Front-End Developer | Media Logic | > ph: 518.456.3015x231 | fx: 518.456.4279 | mlinc.com > -- Chris Rockwell ______________________________________________________________________ css-discuss [css-d@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/