File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6464 font-size : 2.5rem ;
6565 font-weight : lighter;
6666 text-decoration : underline;
67+ text-decoration-color : var (--white );
6768 }
6869
6970 @media (max-width : 720px ) {
7879 & > select {
7980 font-size : 1.5rem ;
8081 border : none;
81- background : white;
82+ background : var ( -- white) ;
8283 }
8384 }
8485
@@ -140,6 +141,14 @@ dl {
140141 block-size : .75em ;
141142 inline-size : .75em ;
142143 }
144+
145+ & [selected ] > a {
146+ text-decoration-color : deeppink;
147+ }
148+
149+ & : not ([selected ]) > a {
150+ text-decoration : none;
151+ }
143152 }
144153}
145154
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ <h3>Circles</h3>
8383 < dl >
8484 < dt > Entrances</ dt >
8585 < dd > < a href ="# "> in:circle:top-right</ a > </ dd >
86- < dd > < a href ="# " autofocus > in:circle:top-left</ a > </ dd >
86+ < dd selected > < a href ="# " autofocus > in:circle:top-left</ a > </ dd >
8787 < dd > < a href ="# "> in:circle:bottom-right</ a > </ dd >
8888 < dd > < a href ="# "> in:circle:bottom-left</ a > </ dd >
8989
Original file line number Diff line number Diff line change @@ -2,8 +2,12 @@ import $ from 'blingblingjs'
22
33const $demo = $ ( 'section' )
44
5+ const [ selected ] = $ ( 'dd' ) . filter ( d =>
6+ d . textContent === 'in:circle:top-left' )
7+
58const state = {
6- transition : 'in:circle:top-left'
9+ transition : 'in:circle:top-left' ,
10+ selected,
711}
812
913const update = transition => {
@@ -28,7 +32,12 @@ $demo.on('click', e => {
2832} )
2933
3034$ ( 'dd' ) . on ( 'click' , e => {
31- let transition = e . target . textContent
35+ let transition = e . currentTarget . textContent
36+
37+ state . selected . removeAttribute ( 'selected' )
38+ e . currentTarget . setAttribute ( 'selected' , true )
39+ state . selected = e . currentTarget
40+
3241 update ( transition )
3342} )
3443
You can’t perform that action at this time.
0 commit comments