Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS classes collisions #104

Open
partikule opened this issue Apr 15, 2011 · 4 comments
Open

CSS classes collisions #104

partikule opened this issue Apr 15, 2011 · 4 comments

Comments

@partikule
Copy link

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
Copy link
Owner

cdotyone commented May 2, 2011

Good point, will probably prefix with "mui"

@cdotyone
Copy link
Owner

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
Copy link
Author

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 [email protected] 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:
#104 (comment)

@cdotyone
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants