#5498 closed enhancement (fixed)
Add 'state' classes to visibility settings JS
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.1 | Priority: | low |
Severity: | minor | Version: | |
Component: | Templates | Keywords: | has-patch early |
Cc: | hnla |
Description
Patch adds 'state' classes; 'open' to the .field-visibility-settings element & 'hide' to .field-visibility-settings-toggle adding /removing them according to the click events.
This enhancement allows CSS to 'know' what state the elements are in and to then be able to render styles accordingly e.g transitions, but in general increases the devs options in managing the elements.
Ideally all control of visual states should be handed back to CSS with JS simply being used to set classes & CSS handling display or any other effects, however wasn't sure what the implications would be on established sites that may have overloaded styles and would suddenly lose the js functionality.
Probably to late to squeeze into 2.0 but useful if we could push this into 2.1?
Attachments (1)
Change History (6)
#2
@
11 years ago
Only issue is that the classes 'hide' and 'open' are pretty general, and are likely to cause conflict with styles provided by some themes/plugins. (I had this problem once with the class 'open', and it was very ugly to fix it.) I'm going to make them a bit more specific to the BP context.
#3
@
11 years ago
- Owner set to boonebgorges
- Resolution set to fixed
- Status changed from new to closed
In 8409:
#4
@
11 years ago
Only issue is that the classes 'hide' and 'open' are pretty general
very good point, I should have pseudo namespaced them or given prefix context
I had this problem once with the class 'open', and it was very ugly to fix it
:) Literally had the same sort of issue two days ago with a scriptlet I wrote which I had to port to another theme.
Add classes to visibility settings elements via JS