Is it valid CSS to have the same class or ID in two different CSS files.
eg
layouts.css
style.css
When I've tested something like this, it worked on FF, Chrome, IE (shudder) and Opera - so the browsers definitely do support doing the above. However is this a documented / accepted method or is this "evil"?
The reason I ask is because I want to have a layout CSS and a style CSS, so that I can retain the same style across all web platforms while just serving a different layout CSS per platform (eg phone, tablet and desktop versions of layout CSS). Thus making it easier to manage the site across different platforms.
This isn't a deal breaker by the way. If it is bad practice then there's plenty of other ways I can achieve the same result. This one just struck me as a potentially clean method (assuming it's acceptable)
eg
layouts.css
Code:
#breadcrums {
position: relative;
width: auto;
/* and other such positioning definitions */
}
style.css
Code:
#breadcrums {
font-family: 'comic sans';
font-size: 25px;
/* etc */
}
When I've tested something like this, it worked on FF, Chrome, IE (shudder) and Opera - so the browsers definitely do support doing the above. However is this a documented / accepted method or is this "evil"?
The reason I ask is because I want to have a layout CSS and a style CSS, so that I can retain the same style across all web platforms while just serving a different layout CSS per platform (eg phone, tablet and desktop versions of layout CSS). Thus making it easier to manage the site across different platforms.
This isn't a deal breaker by the way. If it is bad practice then there's plenty of other ways I can achieve the same result. This one just struck me as a potentially clean method (assuming it's acceptable)









