Package ro.sync.ecss.extensions.api
Interface AuthorPseudoClassController
-
- All Known Subinterfaces:
AuthorDocumentController
@API(type=NOT_EXTENDABLE, src=PUBLIC) public interface AuthorPseudoClassController
Controls setting and resetting pseudo classes.- Since:
- 23
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
removePseudoClass(java.lang.String pseudoClass, AuthorElement element)
Removes a pseudo class from the given element.void
setPseudoClass(java.lang.String pseudoClass, AuthorElement element)
Sets a pseudo class in the specified element.
-
-
-
Method Detail
-
setPseudoClass
void setPseudoClass(java.lang.String pseudoClass, AuthorElement element)
Sets a pseudo class in the specified element.
This change *IS NOT* subject to undo/redo.
What is good for: You can use a non standard (custom) pseudo class to impose a style change on a specific element. For instance you can have CSS styles matching a custom pseudo-class, like the one below:
section:access-control-user { display:block; } section { display:none; }
By setting the
pseudoClass
"access-control-user", the elementsection
will become visible.Another example:
*:caret-visited { color:red; }
You could create anAuthorCaretListener
that sets thecaret-visited
pseudo class to the element at the caret location. The effect will be that all the elements traversed by the caret become red.- Parameters:
pseudoClass
- Name of the pseudo class being set.element
- TheAuthorElement
whose attribute is changing.- Since:
- 15.2
-
removePseudoClass
void removePseudoClass(java.lang.String pseudoClass, AuthorElement element)
Removes a pseudo class from the given element. This change *IS NOT* subject to undo/redo.- Parameters:
pseudoClass
- Name of the pseudo class being set.element
- TheAuthorElement
whose attribute will be removed.- Since:
- 15.2
-
-