Commit 464152c 1 parent a47009b commit 464152c Copy full SHA for 464152c
File tree 4 files changed +12
-5
lines changed
source/_patterns/01-elements
4 files changed +12
-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
- margin-top : to-rem ($pxValue : 12 );
116
+ & :has (+ .description ) {
117
+ float : right ;
118
+ }
117
119
118
- // TODO: add CSS anchor positioning
120
+ & :not (:has (+ .description )) {
121
+ position : absolute ;
122
+ // stylelint-disable-next-line property-no-unknown
123
+ inset-area : block-end span- inline- start;
124
+ }
119
125
120
126
// Description styles
121
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 }} " anchor =" {{ id }} " ></output >{{ /if }}
22
23
{{ #if description }} <p {{ #if describedbyid }} id =" {{ describedbyid }} " {{ /if }} class =" description" >{{{ description }}} </p >{{ /if }}
23
24
{{ #if datalist }} <datalist id =" datalist{{ id }} " >
24
25
{{ #each datalistItems }}
25
26
<option {{ #if value }} value =" {{ value }} " {{ /if }} >{{ text }} </option >
26
27
{{ /each }}
27
28
</datalist >{{ /if }}
28
- {{ #if maxlength }} <output for =" {{ id }} " id =" result_{{ id }} " ></output >{{ /if }}
Original file line number Diff line number Diff line change 106
106
margin-bottom : - #{to-rem ($pxValue : 18 )} ;
107
107
transform : translate ($db-spacing-m , - #{to-rem ($pxValue : 41 )} );
108
108
109
- & + .description {
109
+ & + output ,
110
+ & ~ .description {
110
111
margin-top : 0 ;
111
112
}
112
113
}
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