Support » Plugin: Elementor Page Builder » Global CSS

  • So far so good for basic and even some more detailed CSS adjustments, this is a really great plugin!

    With that being said, maybe I am missing this.. but, do you not have a method for one to enter global or maybe even page specific CSS?

    For example, for sections / columns we can utilize the class field to assign a class.. is there no way to QUICKLY enter the CSS for that class?

    Also, I would suggest to also have field to declare an ID!
    I say that because for further development for example for us writing js, I would like to have a simple class name or ID that I can enter, save, and then address with my js.

Viewing 11 replies - 1 through 11 (of 11 total)
  • @bernardberry646 – I use the Simple CSS plugin for all of my sites 🙂 It’s from the same fellow, Tom Usborne, who makes the GeneratePress theme:

    https://wordpress.org/plugins/simple-css/

    One of the nice things about Simple CSS is that it adds a meta box to each page and post where you can enter CSS that will affect only that page or post.

    And yes, I too second your request for a place to enter an ID in the Elementor widgets in addition to the Class.

    Cheers!
    Lyle

    @learnwpbasics Yes I’m aware of that plugin.. BUT, to get to it one has to exit out of the editing process with Elementor, add or edit CSS on the page and then go back into editing mode..
    GOD forbid you have to back n forth tweaking the CSS setting (obviously the more seasoned would use a browser’s inspector).

    Also, if you choose to make that section a Elementor template that CSS is lost.
    Also, export / import of the work done in Elementor would also lose that CSS.
    Just to name a few reasons to implement some kind of global css option within Elementor.

    I do appreciate and understand exactly what you meant to help with though!
    I’m better off putting the styles im my child css file.

    Plugin Support Boaz

    (@boazpojo)

    Hi @bernardberry646,
    We will include this feature in future versions.

    pingram

    (@pingram3541)

    @boaz please consider making it something that can be disabled for those of use that do not want yet another custom css built into the builder.

    This sounds more of an addon than a core feature – not everyone is goiong to need it making it redundant in some cases.

    pingram

    (@pingram3541)

    Yes, when it comes to visual builders on the front end, none so far have a very powerful live css integration in my opinion.

    Once we have a clear path for writing our own add-ons we can write a very elegant tool for this. As a matter of fact, if Elementor was built into the customizer we’d have this very soon w/ wp 4.7.

    It seems that many devs are not impressed with or are just lacking comfort levels with the core team’s continued strides in providing a space within the WP customizer for live front end page building, custom css editing, selective refresh, sanitization, etc.

    I’ve built a wonderful tool for editing live, per page, per post-type (i.e. shop only, products only) and global css for use within the customizer but similar frustration where I don’t have access to this tool within Elementor requiring a back-and-forth workflow.

    live css within customizer

    Thus I am waiting to port it when we have the exclusive documentation from the Elementor team on how to properly code our add-ons so later they don’t break when Elementor evolves.

    @boazpojo, maybe we can discuss this further on github?

    • This reply was modified 3 years, 1 month ago by pingram.
    • This reply was modified 3 years, 1 month ago by pingram.
    • This reply was modified 3 years, 1 month ago by pingram.
    • This reply was modified 3 years, 1 month ago by pingram.

    @pingram3541 I totally get what your saying. And it makes sense, especially coming from a grizzled coder lol.. My view on Elementor having some kinda global or even per page based way of adding some css was based on keeping things user friendly for the ‘beginner’ AND a way of keeping those CSS adjustments with the respective Elementor template OR export.

    Aside from that for small things like adding a quick ‘clear’ to an element, how much easier AND quicker could it be to add it right there on the spot in a CSS field right where I declare the ID name or class. Definitely not talking about creating a new style sheet.

    pingram

    (@pingram3541)

    @bernardberry646 Ok, let’s talk about that.

    So a simple “custom css” textarea field added to each element right?

    How would Elementor render the styles? You said definitely not a new style sheet, so that leaves us with either direct inline “style” attribute or inline style tags:

    style=”…” vs <style type="text/css">...</style>

    The first adds complexity because almost every Elementor element is a complex arrangement of many html elements, such as wrapper divs, headings, spans, anchor tags, icons. For example, adding an Elementor image, you’d need a textarea for the wrapping div, the inner div, the figure, the image itself and the figcaption so each could have custom css easily applied to the right target. However, not all css can be used within an inline attribute so what about that? There are many complex things such as pseudos, media queries, and other unique rules that will never work with this method and folks will still seek freedom from these constraints (and likely generate plenty of support tickets when the inline styles don’t work or even worse, break the flow).

    If you allow a single textarea per element where it’s contents are to be wrapped in “style” html tags and injected inline above the element, you’ll have full freedom to define your selector of choice (even if it’s not really a rule applying to the element you’re working within) and you’d better get the selector naming just right which is not-so-beginner to be honest. Not a big deal code-wise but you’ve basically just created the ability to litter the page with many style tags for each element when really all you need is one and preferably within the head of the document. This could also effect site grading mechanisms that don’t want to see style tags in the body or complain there are too many.

    If Elementor concatenates all of these style tags into a single one within the head, why not just provide a single page-specific textarea for this? In most cases all you need are two actually. One to be applied site-wide and another page-specific. This is basically what I am proposing, fully flexible for seasoned pros but also simple for beginners too.

    @bernardberry646 Yea man I’m hardly the one able to discuss the “how to” implement it. Have you ever used Cornerstone? It is really really excellent, and I kinda pattern the above request based off of something it has that really works well, convenient, and simple. I personally lean more towards Elementor because of how I can work with columns (column widths)and stacking. It blew my mind that they had no way of directly working with columns and a number of other things UNLESS you visist the forum and actually ask how to do something!

    When I said a field for CSS, maybe it doesn’t have to have a field for every element, post, page.. but maybe a global location to add CSS. So, there is a class field, now add an ID field. And then a main button somewhere that one can then add CSS. So to go as far as your mention of inline styling, I wouldn’t go that far.

    I say this because it can export this CSS per my export of a template, etc. Thus that CSS travels with that export.

    So you named a few pitfalls, like selector naming.. all of what’s been proposed could be features that only show when the “Show advanced settings” option is turned on with a warning about being advanced, be careful you could break something 🙂

    Plugin Support Boaz

    (@boazpojo)

    Hey guys,
    Thank you for your contribution for this discussion.
    We are still checking this issue, but for now it seems that we will include this option in Elementor Pro, and it will not be a part of Elementor’s core.

    Thanks!

    Just want to add my vote for some way to add div id’s to sections and contents

    • This reply was modified 3 years, 1 month ago by moses5407.
Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Global CSS’ is closed to new replies.