You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off, thank you for your contribution of this library, fantastic stuff and looking forward to v3!
Along that line, I'm currently working on adopting v2 and one thing that would be nice is to have the ability to re-use the CSS classes elsewhere within a site. Unfortunately, many of the styles are tied to element IDs (e.g., #s-bl) making it (theoretically) impossible to re-use (since id's should be unique on a page).
Possibly this approach is necessary but if not, would like to see CSS classes that can be re-used implemented.
The use case is having a Cookie Policy page that contains the exact same table as the Preferences Modal including the same styling. To achieve currently, I'm copy/pasting the CSS to work around but this results in performance impact for pages (larger payload size & processing) in addition to maintenance overhead when new versions are released.
Appreciate your consideration!
Proposed solution
Change (or enhance) CSS selectors from element id's to classes (e.g. #s-bl table might become .cc-s-bl table or #s-bl table, table.cc-ct)
Additional details
No response
The text was updated successfully, but these errors were encountered:
The id is there to raise the CSS selector specificity/strength so that the style of the plugin is not (easily/unintentionally) overridden by other CSS rules. The other (uglier) option would have been to use the !important directive on all CSS rules.
Description
First off, thank you for your contribution of this library, fantastic stuff and looking forward to v3!
Along that line, I'm currently working on adopting v2 and one thing that would be nice is to have the ability to re-use the CSS classes elsewhere within a site. Unfortunately, many of the styles are tied to element IDs (e.g.,
#s-bl
) making it (theoretically) impossible to re-use (since id's should be unique on a page).Possibly this approach is necessary but if not, would like to see CSS classes that can be re-used implemented.
The use case is having a
Cookie Policy
page that contains the exact same table as thePreferences Modal
including the same styling. To achieve currently, I'm copy/pasting the CSS to work around but this results in performance impact for pages (larger payload size & processing) in addition to maintenance overhead when new versions are released.Appreciate your consideration!
Proposed solution
Change (or enhance) CSS selectors from element id's to classes (e.g.
#s-bl table
might become.cc-s-bl table
or#s-bl table, table.cc-ct
)Additional details
No response
The text was updated successfully, but these errors were encountered: