cdotyone / mochaui

development tree for MochaUI
http://mochaui.org/demo/
Other
290 stars 83 forks source link

CSS classes collisions #104

Open partikule opened 13 years ago

partikule commented 13 years ago

In the previous version (0.9.7), most of the CSS classes were prefixed by ".mocha". For example, .mochaTitlebar , .mochaMinimizeButton, etc.

This was great, because it avoid collision between Mocha and any of the potential "application" side CSS rule defined by the user.

For example, now, the window.css defines some selectors like ".mochaTitlebar .toolbar span.icon". Great: the CSS definition is smaller... But if the user has defined a global ".icon" for its application, the toolbar icon will inherit from it, wich can destroy the mocha titlebar.

From my point of view, an enclosing UI system like MochaUI should ensure the user he hasn't to perfectly know all the existing CSS rules to create his own application. The second reason is he will be sure he can update his mocha version and be sure his application CSS will not damage MochaUI.

Great work guys !

cdotyone commented 13 years ago

Good point, will probably prefix with "mui"

cdotyone commented 13 years ago

I have given this more thought.

I am thinking all controls will start their definition with mui and all sub css names will use casing to help out with the conflicts.

So for the example given.

.muiTitlebar .muiToolbar span.Icon

Do you think this will provide for enough collision prorection. Most people use lower case CSS tags.

-Chris

partikule commented 13 years ago

Hi Chris,

This can help of course. Just check if one global defined .icon CSS class doesn't generate a collision with the MUI one.

Anyway, how is going the project ? Do you plan a release which could be considered as the new MUI ?

Michel-Ange

Le 10 août 2011 à 07:49, cdotyone reply@reply.github.com a écrit :

I have given this more thought.

I am thinking all controls will start their definition with mui and all sub css names will use casing to help out with the conflicts.

So for the example given.

.muiTitlebar .muiToolbar span.Icon

Do you think this will provide for enough collision prorection. Most people use lower case CSS tags.

-Chris

Reply to this email directly or view it on GitHub: https://github.com/mui/mochaui/issues/104#issuecomment-1770056

cdotyone commented 13 years ago

Thanks, It is going slower than I want. I am stopping any new features and just working out the problems with current code base, so that we can pause for a version release. -Chris