Visitor
Represent an operation to be performed on the elements of an object structure, using sibling combinators.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Visitor
ARCANUM SCHOOL: Transmutation // External Manipulation
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
/* A visitor element interacts with adjacent elements without modifying their internal structure */
.visitor-light:hover ~ .dark-rune {
filter: brightness(200%) sepia(100%) hue-rotate(50deg);
color: yellow;
transition: filter 0.5s;
}
.visitor-shadow:active + .bright-sigil {
opacity: 0.1;
transform: scale(0.95);
}
The Visitor pattern is perfectly emulated by the sibling combinators (~ and +). The state of an external control node cascades changes through independent neighboring structures.
Runic Tags:
#css
#combinators
#interaction
#design-patterns