File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 111111 container : pkgname / inline-size ;
112112
113113 & __name {
114- display : inline-block ;
115- white-space : nowrap ;
116-
117- .p-tooltip__message {
118- font-weight : 400 ;
119- }
120-
121114 --length : 40 ; // default value, it should be overridden via inline styles on the element
122115 --fs-ratio : 1.765 ; // height/width (1rem/1ch) ratio measured in the browser
123116 // we take the full width of the container and divide it by the number of characters in the
126119 --target-font-size : calc (
127120 (100 cqw / (2 + var (--length ))) * var (--fs-ratio )
128121 );
122+
129123 // we limit the font size to the smallest and largest available sizes
130124 --max-font-size : #{map-get ($settings-text-h1-mobile , font-size )} rem; // size of the title
131125 --min-font-size : #{map-get ($settings-text-h5-mobile , font-size )} rem; // smallest size we allow
126+
127+ @media (min-width : $breakpoint-heading-threshold ) {
128+ --min-font-size : #{map-get ($settings-text-h5 , font-size )} rem;
129+ --max-font-size : #{map-get ($settings-text-h1 , font-size )} rem;
130+ }
131+
132+ display : inline-block ;
132133 font-size : clamp (
133134 var (--min-font-size ),
134135 var (--target-font-size ),
135136 var (--max-font-size )
136137 );
138+ white-space : nowrap ;
137139
138- @media (min-width : $breakpoint-heading-threshold ) {
139- --min-font-size : #{map-get ($settings-text-h5 , font-size )} rem;
140- --max-font-size : #{map-get ($settings-text-h1 , font-size )} rem;
140+ .p-tooltip__message {
141+ font-weight : 400 ;
141142 }
142143 }
143144 }
You can’t perform that action at this time.
0 commit comments