I often wind up doing CSS theming based on node specific rules.
Would love to future (migration) proof this site and node specific theming.
Promise this is a real use case I've recently dealt with.
I often wind up doing CSS theming based on node specific rules.
Would love to future (migration) proof this site and node specific theming.
Promise this is a real use case I've recently dealt with.
Comments
Comment #1
austintnacious commentedI'll second the desire to optionally add the UUID to node body classes.
There are so many times when you need to select a specific page, term, whatever to apply styles to.
This would be a great feature!
Comment #2
neochief commentedUnless you want to turn your css files into nightmare, this would be pretty bad idea. Instead, add process this in templates and put the human-readable classes into template.
Comment #3
doublejosh commentedIt's true that placing a non-human readable class like this is not awesome.
It's also true that it will be bloating in terms of size within CSS files.
Suppose there are CSS and Code Per Node.
However,
-- When styles are truly node-page specific, using a UUID is actually the best way to reference them... for migration and environment.
-- Human readable classes from the node would need to rely on URL, title, nid, etc... all of which are what I'm trying to get away from.
Since writing this I have employed a node specific CSS include technique.
This certainly could be used via UUID and certainly moved out of the theme.
So perhaps the thread could change to: Add Candidate Node UUID CSS File.
Code would be more like this (added a date indicator to respect file age for caching).
This does actively improve front-end performance by removing page specific code from general CSS files.
Guessing though that approach is adequately outside UUID's scope.
Still assume that a "UUID in body classes" checkbox would be useful for some folks.
Comment #4
doublejosh commentedPosted the candidate CSS file thing in Code Per Node #1441732: Node specific CSS candidate from theme
I guess the CSS body class idea was deemed too ugly.
Comment #5
doublejosh commented