File tree Expand file tree Collapse file tree 4 files changed +11
-5
lines changed
source/_patterns/01-elements Expand file tree Collapse file tree 4 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 113
113
114
114
// counter styling
115
115
%form-element-counter {
116
- // TODO: add CSS anchor positioning
116
+ & :has (+ .description ) {
117
+ float : right ;
118
+ }
119
+
120
+ & :not (:has (+ .description )) {
121
+ position : absolute ;
122
+ // stylelint-disable-next-line property-no-unknown
123
+ inset-area : block-end span- inline- start;
124
+ }
117
125
118
126
// Description styles
119
127
// TODO: This probably still needs to get further changed to a general "hint" pattern or similar
Original file line number Diff line number Diff line change 19
19
aria-hidden =" true"
20
20
id =" {{ id }} -label"
21
21
{{ #if labelHidden }} data-label-hidden =" true" {{ /if }} >{{ label }} </label >
22
- {{ #if maxlength }} <output for =" {{ id }} " id =" result_{{ id }} " ></output >{{ /if }}
22
+ {{ #if maxlength }} <output for =" {{ id }} " id =" result_{{ id }} " anchor = " {{ id }} " ></output >{{ /if }}
23
23
{{ #if description }} <p {{ #if describedbyid }} id =" {{ describedbyid }} " {{ /if }} class =" description" >{{{ description }}} </p >{{ /if }}
24
24
{{ #if datalist }} <datalist id =" datalist{{ id }} " >
25
25
{{ #each datalistItems }}
Original file line number Diff line number Diff line change 158
158
+ label
159
159
+ output {
160
160
@extend %form-element-counter ;
161
-
162
- float : right ;
163
161
}
164
162
}
165
163
Original file line number Diff line number Diff line change 10
10
{{ #if maxlength }} maxlength =" {{ maxlength }} "
11
11
oninput =" result_{{ id }} .value=this.value.length+'/'+this.attributes.maxlength.value" {{ /if }}
12
12
{{ #if variant }} data-variant =" {{ variant }} " {{ /if }} >{{ value }} </textarea >
13
- {{ #if maxlength }} <output for =" {{ id }} " id =" result_{{ id }} " ></output >{{ /if }}
13
+ {{ #if maxlength }} <output for =" {{ id }} " id =" result_{{ id }} " anchor = " {{ id }} " ></output >{{ /if }}
14
14
{{ #if description }} <p {{ #if describedbyid }} id =" {{ describedbyid }} " {{ /if }} class =" description" >{{{ description }}} </p >{{ /if }}
You can’t perform that action at this time.
0 commit comments