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

Design suggestion for cross browser compitablity #11

Closed
jigneshthummar opened this issue Apr 12, 2012 · 6 comments
Closed

Design suggestion for cross browser compitablity #11

jigneshthummar opened this issue Apr 12, 2012 · 6 comments

Comments

@jigneshthummar
Copy link

I suggest to add browser name and version in body class

for example

right now Magento shows body class name as follow for home page
<body class=" cms-index-index cms-home">

Suggested class name for chrome

<body class="cms-index-index cms-home Chrome Chrome18">

For Firefox

<body class="cms-index-index cms-home Firefox Firefox11">

For IE

<body class="cms-index-index cms-home MSIE MSIE9">

by doing this Magento can remove IE specific conditional css as well

This will help when we want to add browser specific css and even browser version specific css, so when ever i want to make change for perticular browser i just need to write .MSIE .className { property:value; } this is applied to all IE if i want more specfic solution .MSIE9 .className { property:value; } this change only applied for IE9

Please share your thoughts on this

@kirmorozov
Copy link
Member

It's definitely bad idea.
All browsers have their specific css(ex: mos for firefox).
Please fix your css instead of making mess.

@jigneshthummar
Copy link
Author

@kirmorozov yeah u r right browser have their specific css properties,

but its idea for common properties some Wordpress sites use same trick.

@kirmorozov
Copy link
Member

What stops you from adding this class using JavaScript. It won't affect performance much and it wont affect server performance at all.
@jigneshthummar IMHO this is the way to fix some bug with own css.

P.S. Probably you didn't heard of http://code.google.com/p/ie7-js/

@Flyingmana
Copy link
Member

i have used https://github.com/rafaelp/css_browser_selector for this since some time now.
So either you dont care about this, and give a note in manual to this library or add this as standard library (what sure has its benefits)

And if we talk about this, http://modernizr.com/ belongs in the same area, than many things are depending on a feature, not on a browser.

In any case, its a theming question. Maybe its the best to have a more simple js-less main theme, and an additional "perfect" theme which makes havy use of js.

@magento-team
Copy link
Contributor

@jigneshthummar
Thank you for suggestion. We'll not implement it though -- as @kirmorozov and @Flyingmana pointed out, there are more effective solutions are possible without affecting server performance.

@jigneshthummar
Copy link
Author

Ok thanks @Flyingmana @kirmorozov for their valuable suggestions :)

adamzero1 referenced this issue in adamzero1/magento2 Feb 26, 2023
…tic-checker

Issue #5 GitHub Action Semantic Checker
@FabXav FabXav mentioned this issue Oct 11, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants