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
Modifier and TypeMethodDescriptionvoidremovePseudoClass(String pseudoClass, AuthorElement element) Removes a pseudo class from the given element.voidsetPseudoClass(String pseudoClass, AuthorElement element) Sets a pseudo class in the specified element.
-
Method Details
-
setPseudoClass
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 elementsectionwill become visible.Another example:
*:caret-visited { color:red; }You could create anAuthorCaretListenerthat sets thecaret-visitedpseudo 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- TheAuthorElementwhose attribute is changing.- Since:
- 15.2
-
removePseudoClass
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- TheAuthorElementwhose attribute will be removed.- Since:
- 15.2
-