MMBase

Cascading css classes of components are way to specific

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.9.0
  • Component/s: Core
  • Description:
    Hide
    <div class="mm_c mm_c_core mm_c_b_welcome ${requestScope.className}" > is to complicated. It would be more simple to use the component names and block names, although they are not namespaced, but this is not easy to comprehend. Like for example: <div class="mm_c core welcome" >
    Show
    <div class="mm_c mm_c_core mm_c_b_welcome ${requestScope.className}" > is to complicated. It would be more simple to use the component names and block names, although they are not namespaced, but this is not easy to comprehend. Like for example: <div class="mm_c core welcome" >

Issue Links

Activity

Hide
Michiel Meeuwissen added a comment - 2008-06-05 08:38
I think de advantage of the current approach is that there can be no confusion about what is a block, and what is a componentl.

It could e.g. be well possible to have a block with the same name as it's component. '_c_' and '_c_b_' make sure no collisions like that can occur.

Namespacing everything by mm_ should prevent all other conflicts.
But perhaps using the mm_c sibling class would be enough.

How about (in css):
mm_c.c_core.b_welcome {
}
or
mm_c.core.b_welcome
?
Show
Michiel Meeuwissen added a comment - 2008-06-05 08:38 I think de advantage of the current approach is that there can be no confusion about what is a block, and what is a componentl. It could e.g. be well possible to have a block with the same name as it's component. '_c_' and '_c_b_' make sure no collisions like that can occur. Namespacing everything by mm_ should prevent all other conflicts. But perhaps using the mm_c sibling class would be enough. How about (in css): mm_c.c_core.b_welcome { } or mm_c.core.b_welcome ?
Hide
André van Toly added a comment - 2008-06-27 14:29
I think that would be allright. My main issue with the original approach was that a block would hold to many classes, of whcih many would have never been used.
Show
André van Toly added a comment - 2008-06-27 14:29 I think that would be allright. My main issue with the original approach was that a block would hold to many classes, of whcih many would have never been used.

People

Dates

  • Created:
    2008-04-25 17:49
    Updated:
    2008-06-27 14:36
    Resolved:
    2008-06-27 14:36