![]() ![]() You can likely even mix that together ("important product" or "important location"), which would then pave the way for having unimportant products/locations. Of course, what he did can still be compatible with HTML being content-declarative if you use a class like "important" or "special" or something that way, you're still describing what the thing is without polluting HTML with presentation details. This is even more relevant if you're using some kind of CSS preprocessor language (or whatever the term would be) like SASS/SCSS or LESS, since you can define that style as a mixin and apply it to each of the styles for specific content classes as you see fit. If he stuck to letting HTML describe the content and CSS describe the presentation of that content, then when his tastes inevitably change, he'd just need to change one or the other class' styles in his CSS and call it a day. products, he'll now have to do the thing he was trying to avoid in the first place and have to create the new style. The new problem, though, is that in this case, if the developer wants to eventually use a different style for locations v. > Being the lazy developer I was, though, I just reused the `location` class and applied it to my products. , it doesn't look like it's doing all that much that'd be likely to conflict with anything in a way that would absolutely necessitate starting from scratch. If the provided style really is getting in the way, it should be (relatively) easy to figure out what specifically is getting in the way (and then addressing it in your own CSS) instead of just blowing away the whole table style and starting from scratch. and rebuilding.Īlso, most modern browsers have a "developer" mode that shows exactly what CSS rules come from where. If you really do want to completely override the table style, it looks like it's just a matter of removing the respective line in. ![]() It's CSS' job to describe how it's supposed to be presented.įor that reason, I'll generally choose a. Classes should therefore describe what something is, not how it's supposed to be presented. HTML should be declarative, and it should be declarative of the content, not necessarily the presentation. Personally, if I have to slap a bunch of classes on everything, then something is seriously wrong. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |