-
AuthorPosts
-
July 29, 2021 at 10:28 am #1313197
Hey there,
so instead of putting the element styles inline, they are now aggregated into a custom css file. So far so good.We now face the problem that the generated styles are more precisely declared then the ones we use in our projects. I saw there are some new filters to modify this output, but I wonder why there is no such filter for the padding output? I took a quick look at the new function and noticed there is a ‘skip_empty’ attribute that can be used. But if you create a new column for example, it already has a 0px default value for the padding. This 0px padding is also present in the generated css file. Any chance we get a filter for that too, or that you just leave the default values out of the generated css?
Thanks!
edit:
Oh, I forgot: I didn’t see any way to deactivate this new css generation completely. Or did I miss something? I know we can overwrite these new functions, but that seems a bit overkill espacially in regard to future updates.- This topic was modified 3 years, 4 months ago by Pixel_Production.
July 29, 2021 at 1:23 pm #1313256Hey Pixel_Production,
Thank you for using Enfold and your feedback.
padding for columns
I modified the CSS output to be backwards compatible with prior 4.8.4 for 0, 0px, 0% to skip padding. And for new columns the default value is empty string, same for border radius.
Here is a link to the modified file with a few more changes/fixes: https://github.com/KriesiMedia/enfold-library/blob/master/temp_fixes/Enfold_4_8_5/template_builder/columns.php
deactivate css generation completely
We can add a filter to skip it on a per page basis, but this will make most customization of ALB elements obsolete that require styles and not classes only. Step by step we want to remove most of all inline html style=”…” and extend the styling options for elements like we did already with buttons, notification box, …. (see changelog).
Together with the custom elements we added recently this will make it easier to get a consistent and easy maintainable layout.
Of course we can provide filters – let us know and we will add them.
We try to keep our selectors as weak as possible (mostly .container-class.element-id).
Best regards,
GünterEdit: element-id is depending on shortcode attributes, means if options change also element-id changes.
Edit: To invalidate all post css files save theme options.
July 29, 2021 at 3:50 pm #1313277Hey Günter,
thank you for your reply and customized file.I didn’t have the time yet to take a closer look or the chance to work with the new update. A co-worker who does technical support and theme updates told me about the issue. Our declarations are some times not the most accurate and some people use helper classes like for example “p-40” to add some styling. These get overwritten by the new unique classes.
I guess the easiest way would be a filter, like the new ones you guys introduced for border-radius, animation and co.
So far it’s really just the padding that gives us some headache, since we usually don’t use the elements own fields for customization.Or, like you said your custom file does, ignore the default values. But I understand that this can be an issue for other user/sites.
Overall I think this is a great addition to the theme, so don’t get me wrong. I don’t want to get completely rid of this new functionality. I just wasn’t sure if there is maybe a option to disable it for older projects that I missed in the changelog/backend.
Thanks again!
- This reply was modified 3 years, 4 months ago by Pixel_Production.
July 29, 2021 at 4:20 pm #1313288 -
AuthorPosts
- You must be logged in to reply to this topic.