-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate OR Unneeded Css when using [breakdance_block blockid="$post_id"] OR \Breakdance\Render\render($post_id) #743
Comments
Update I discovered the issue here, and a little adjusted it myself, but I think it is still an issue of bloat in a sense, or just duplicate css. What happens is, the My Temporary Fix What I did for some very common elements, like This on the frontend, removes the duplicate css (as from the previous screenshots), while still maintain the defaults styles for those elements, to only be loaded once from the Question What do you think should be done in this case? As this obviously affects other elements being rendered through |
Hey @theperfectwill thanks for your report and suggestions. I will pass this internally to see what we can do about this. |
Hi. Ok. To add to the thread, what I did was move all the I'm not sure what might be most performance friendly in comparison, but perhaps an This is just one idea, or brainstorm. For me, I'd rather have one standard |
The reason we don't do this is because most sites don't use anywhere close to all the elements so we'd be loading a lot of stuff that is never used, so the performance for 99% of users is far better with our approach, even though it means a tiny amount of CSS is duplicated. |
What version of Breakdance are you using?
v1.2.1 and 1.3 alpha 1
What browser are you using?
Brave (Chromium)
What operating system are you using?
macOS
Reproduction Steps
Just let me know if there is something I should test/or change.
When having multiple instances of the shortcode
[breakdance_block blockid="$post_id"]
OR whenecho \Breakdance\Render\render($post_id);
is called for Breakdance content outside of the currently displayed post.There are multiple instances of unneeded (duplicate) css generated where used, OR css that should have an ID prefixed to it, so it only applied to content generated from that post, and not global applied to the page where the shortcode or global element is inserted. I hope that makes sense, because then it becomes complicated to overwrite the css.
You can view the screenshots below of what I mean. Correct me if I am wrong, but all these styles seem to be styles that should be explicitly part of the "Global Styles" file. Which brings me to also mention a feature suggestion.
That suggestion is a "Global Elements"
A Proposed (brainstorm) Solution
The screenshot below is what I mean about having a specific section to style global elements of Breakdance, which then would be generated into a "global-elements.css" file, to avoid the issue above, while creating a specific section for users to customize the default style of certain elements.
Facebook Post Reference: https://www.facebook.com/groups/breakdanceofficial/posts/5999883150046930/
The text was updated successfully, but these errors were encountered: