Forums

Suggestion for WordPress CSS (4 posts)

  1. PrettySickPuppy.com
    Member
    Posted 1 year ago #

    Hello All,

    As I'm trying to (and so far successfully) integrate WP with other applications (ie, a shopping cart, and yes, I know WP has it's own commerce plug-in for this - but to change now IS NOT FEASIBLE), I would like to make a suggestion regarding WP CSS...

    I would be great to have an option in the Dashboard to add a pre-fix for CSS selectors, etc. Either that or to change CSS in future releases to prefix each standard CSS definition with "wp", "wp_" or "wp-", etc.

    Why you may ask? Simply because I've found WP to be so easily extensible that adding this for WP CSS just makes sense and furthers the cause of WP being so darned friendly - not just to use as a user, but for developers and integrators as well.

    Integrating apps is a pain and time intensive. Something like this would go a LONG WAYS to make life easier for all.

    But there is one caveat - what to do with all the previous templates that has CSS already setup and defined under the current naming convention? Pretty simple, actually. Options in the Dashboard for OLD or NEW CSS naming convention and provide a tool for converting CSS files in either direction (Old to New, and New back to Old, etc.).

    The problem of integrating WP, or any web based application for that matter, is that CSS for each app often has the same ID or CLASS names for common items. Such as "container", "wrapper", etc. By pre-fixing all items with "wp" or a variation of it, would go a long way to alleviate application overlap in regards to CSS and prevent countless hours of having to fix any such overlap.

    Well, it is just a suggestion... That it's actually ever implemented is probably less than a snowball's chance in hell (LOL). But it is worth mentioning in the case there are others who are so inclined to agree. If I had the skills and time, I would do it myself, but I don't unfortunately.

    My Two Cents,

    PrettySickPuppy.com

  2. s_ha_dum (was apljdi)
    Member
    Posted 1 year ago #

    I think that most of the css selectors you are talking about aren't implemented by WordPress itself but by theme and plugin designers and WordPress can't really enforce what those designers do. Similar behavior to what you suggest seems to be encouraged though.

    For the most part, the WordPress core doesn't process the theme or plugin css at all. It may as well not be there from the core's perspective, so I'm not sure in what way a dashboard option would help. WordPress does generate some post and body classes so you could add prefixes there, but most of template/plugin css is out of WordPress's control.

  3. apljdi is right. They're mostly done via the themes, so that would be hellish to attempt and would still be on a per-theme basis.

    Theme replication across multiple apps is a hassle, I agree. I do it too.

  4. PrettySickPuppy.com
    Member
    Posted 1 year ago #

    I know... Each of your comments are correct. It was just a wish list item and in a perfect world... Oh well.

    My Dad use to tell me, "If wishes were fishes, we'd all have a fry". I'm updating that to, "If I had a fish for every wish, I'd be an ocean."

    And I wish I had more time to do so, plus have great regex skills (which I don't) that would be required to write an app that could go through the Theme's CSS file and then update all the other files in the Theme's directory for each id="xxx" and class="yyy". You get the idea. Of course I would test the hell out of it on different themes, etc.

    Who knows, perhaps a bored programmer with time on their hands, or an intern somewhere might tackle this as a pet project. Once in awhile I come up with a good idea, just no time to pursue it or have the prerequiste skills to run with it.

    May the Bit-Bucket of Heaven rain upon us the 1's and 0's in the correct sequence to turn chaos into order...

    LOL

    PrettySickPuppy.com - it takes one to wear one

Topic Closed

This topic has been closed to new replies.

About this Topic