|
202 | 202 | -webkit-appearance: none; |
203 | 203 | } |
204 | 204 |
|
| 205 | + &:has(input:read-only:not(:disabled, [role="combobox"], [type="file"])), |
| 206 | + &:has(textarea:read-only:not(:disabled)) { |
| 207 | + igx-prefix, |
| 208 | + [igxPrefix], |
| 209 | + igx-suffix, |
| 210 | + [igxSuffix] { |
| 211 | + color: var-get($theme, 'disabled-text-color'); |
| 212 | + } |
| 213 | + |
| 214 | + %form-group-label { |
| 215 | + color: var-get($theme, 'idle-secondary-color'); |
| 216 | + } |
| 217 | + |
| 218 | + %form-group-line { |
| 219 | + background: var-get($theme, 'focused-secondary-color'); |
| 220 | + } |
| 221 | + |
| 222 | + %form-group-helper { |
| 223 | + color: var-get($theme, 'helper-text-color'); |
| 224 | + } |
| 225 | + } |
| 226 | + |
205 | 227 | igx-icon, |
206 | 228 | igx-icon[igxPrefix], |
207 | 229 | igx-icon[igxSuffix] { |
|
363 | 385 | %form-group-bundle--hover { |
364 | 386 | //cursor: pointer; |
365 | 387 |
|
366 | | - &::after { |
367 | | - border-block-end-width: rem(1px); |
368 | | - border-block-end-color: var-get($theme, 'hover-bottom-line-color'); |
| 388 | + &:has(input:not([readonly])), |
| 389 | + &:has(textarea:not([readonly])), |
| 390 | + &:has(input[readonly][role="combobox"]), |
| 391 | + &:has(input[readonly][type="file"]) { |
| 392 | + &::after { |
| 393 | + border-block-end-width: rem(1px); |
| 394 | + border-block-end-color: var-get($theme, 'hover-bottom-line-color'); |
| 395 | + } |
369 | 396 | } |
370 | 397 | } |
371 | 398 |
|
|
397 | 424 | } |
398 | 425 |
|
399 | 426 | %form-group-bundle--error { |
400 | | - &::after { |
401 | | - border-block-end-color: var-get($theme, 'error-secondary-color'); |
| 427 | + &:has(input:not([readonly])), |
| 428 | + &:has(textarea:not([readonly])), |
| 429 | + &:has(input[readonly][role="combobox"]), |
| 430 | + &:has(input[readonly][type="file"]) { |
| 431 | + &::after { |
| 432 | + border-block-end-color: var-get($theme, 'error-secondary-color'); |
| 433 | + } |
| 434 | + |
| 435 | + caret-color: initial; |
402 | 436 | } |
403 | | - caret-color: initial; |
404 | 437 | } |
405 | 438 |
|
406 | 439 | %form-group-bundle--disabled { |
|
612 | 645 | %bootstrap-file-focused, |
613 | 646 | %bootstrap-file-valid, |
614 | 647 | %bootstrap-file-warning, |
615 | | - %bootstrap-file-invalid, |
616 | | - { |
| 648 | + %bootstrap-file-invalid { |
617 | 649 | %form-group-bundle { |
618 | 650 | border-radius: var-get($theme, 'box-border-radius'); |
619 | 651 | transition: box-shadow .15s ease-out, border .15s ease-out; |
|
714 | 746 | &:hover { |
715 | 747 | background: var-get($theme, 'box-background-hover'); |
716 | 748 | } |
| 749 | + |
| 750 | + &:has(input:read-only:not(:disabled, [role="combobox"], [type="file"])), |
| 751 | + &:has(textarea:read-only:not(:disabled)) { |
| 752 | + background: var-get($theme, 'box-background-focus'); |
| 753 | + } |
717 | 754 | } |
718 | 755 |
|
719 | 756 | %form-group-bundle--box-focus { |
|
873 | 910 | display: none; |
874 | 911 | } |
875 | 912 |
|
876 | | - &:hover { |
877 | | - %form-group-bundle-start { |
878 | | - border-color: var-get($theme, 'hover-border-color'); |
879 | | - } |
| 913 | + &:has(input:not([readonly])), |
| 914 | + &:has(textarea:not([readonly])), |
| 915 | + &:has(input[readonly][role="combobox"]), |
| 916 | + &:has(input[readonly][type="file"]) { |
| 917 | + &:hover { |
| 918 | + %form-group-bundle-start { |
| 919 | + border-color: var-get($theme, 'hover-border-color'); |
| 920 | + } |
880 | 921 |
|
881 | | - %igx-input-group__filler { |
882 | | - border-color: var-get($theme, 'hover-border-color'); |
883 | | - } |
| 922 | + %igx-input-group__filler { |
| 923 | + border-color: var-get($theme, 'hover-border-color'); |
| 924 | + } |
884 | 925 |
|
885 | | - %igx-input-group__notch { |
886 | | - border-block-start-color: var-get($theme, 'hover-border-color'); |
887 | | - border-block-end-color: var-get($theme, 'hover-border-color'); |
888 | | - } |
| 926 | + %igx-input-group__notch { |
| 927 | + border-block-start-color: var-get($theme, 'hover-border-color'); |
| 928 | + border-block-end-color: var-get($theme, 'hover-border-color'); |
| 929 | + } |
889 | 930 |
|
890 | | - %form-group-bundle-end { |
891 | | - border-color: var-get($theme, 'hover-border-color'); |
| 931 | + %form-group-bundle-end { |
| 932 | + border-color: var-get($theme, 'hover-border-color'); |
| 933 | + } |
892 | 934 | } |
893 | 935 | } |
894 | 936 | } |
|
948 | 990 | } |
949 | 991 |
|
950 | 992 | %form-group-bundle-search--hover { |
951 | | - box-shadow: var-get($theme, 'search-hover-shadow'); |
952 | | - border-color: var-get($theme, 'hover-border-color'); |
| 993 | + &:has(input:not([readonly])) { |
| 994 | + box-shadow: var-get($theme, 'search-hover-shadow'); |
| 995 | + border-color: var-get($theme, 'hover-border-color'); |
| 996 | + } |
953 | 997 | } |
954 | 998 |
|
955 | 999 | %form-group-bundle-search--focus { |
|
1323 | 1367 | } |
1324 | 1368 |
|
1325 | 1369 | %form-group-input--hover { |
1326 | | - cursor: pointer; |
1327 | | - color: var-get($theme, 'filled-text-hover-color'); |
| 1370 | + &:not([readonly]), |
| 1371 | + &[role="combobox"] { |
| 1372 | + cursor: pointer; |
| 1373 | + color: var-get($theme, 'filled-text-hover-color'); |
1328 | 1374 |
|
1329 | | - &::placeholder { |
1330 | | - color: var-get($theme, 'hover-placeholder-color'); |
| 1375 | + &::placeholder { |
| 1376 | + color: var-get($theme, 'hover-placeholder-color'); |
| 1377 | + } |
1331 | 1378 | } |
1332 | 1379 | } |
1333 | 1380 |
|
|
1490 | 1537 | } |
1491 | 1538 |
|
1492 | 1539 | %form-group-border--error { |
1493 | | - %form-group-bundle-start { |
1494 | | - border-inline-start-color: var-get($theme, 'error-secondary-color'); |
1495 | | - border-block-start-color: var-get($theme, 'error-secondary-color'); |
1496 | | - border-block-end-color: var-get($theme, 'error-secondary-color'); |
1497 | | - } |
| 1540 | + &:has(input:not([readonly])), |
| 1541 | + &:has(textarea:not([readonly])), |
| 1542 | + &:has(input[readonly][role="combobox"]), |
| 1543 | + &:has(input[readonly][type="file"]) { |
| 1544 | + %form-group-bundle-start { |
| 1545 | + border-inline-start-color: var-get($theme, 'error-secondary-color'); |
| 1546 | + border-block-start-color: var-get($theme, 'error-secondary-color'); |
| 1547 | + border-block-end-color: var-get($theme, 'error-secondary-color'); |
| 1548 | + } |
1498 | 1549 |
|
1499 | | - %form-group-bundle-end { |
1500 | | - border-inline-end-color: var-get($theme, 'error-secondary-color'); |
1501 | | - border-block-start-color: var-get($theme, 'error-secondary-color'); |
1502 | | - border-block-end-color: var-get($theme, 'error-secondary-color'); |
1503 | | - } |
| 1550 | + %form-group-bundle-end { |
| 1551 | + border-inline-end-color: var-get($theme, 'error-secondary-color'); |
| 1552 | + border-block-start-color: var-get($theme, 'error-secondary-color'); |
| 1553 | + border-block-end-color: var-get($theme, 'error-secondary-color'); |
| 1554 | + } |
1504 | 1555 |
|
1505 | | - %igx-input-group__notch, |
1506 | | - %igx-input-group__filler { |
1507 | | - border-block-color: var-get($theme, 'error-secondary-color'); |
1508 | | - } |
| 1556 | + %igx-input-group__notch, |
| 1557 | + %igx-input-group__filler { |
| 1558 | + border-block-color: var-get($theme, 'error-secondary-color'); |
| 1559 | + } |
1509 | 1560 |
|
1510 | | - %form-group-bundle--border:hover { |
1511 | | - %form-group-bundle-start, |
1512 | | - %form-group-bundle-end, |
1513 | | - %igx-input-group__filler, |
1514 | | - %igx-input-group__notch { |
1515 | | - border-color: var-get($theme, 'error-secondary-color'); |
| 1561 | + %form-group-bundle--border:hover { |
| 1562 | + %form-group-bundle-start, |
| 1563 | + %form-group-bundle-end, |
| 1564 | + %igx-input-group__filler, |
| 1565 | + %igx-input-group__notch { |
| 1566 | + border-color: var-get($theme, 'error-secondary-color'); |
| 1567 | + } |
1516 | 1568 | } |
1517 | 1569 | } |
1518 | 1570 | } |
|
1656 | 1708 | &:focus { |
1657 | 1709 | background: var-get($theme, 'box-background-hover'); |
1658 | 1710 | } |
| 1711 | + |
| 1712 | + &:has(input:read-only:not(:disabled, [role="combobox"], [type="file"])), |
| 1713 | + &:has(textarea:read-only:not(:disabled)) { |
| 1714 | + &:not(:focus-within) { |
| 1715 | + &::after { |
| 1716 | + border-block-end: rem(1px) solid var-get($theme, 'disabled-text-color'); |
| 1717 | + } |
| 1718 | + |
| 1719 | + &:hover { |
| 1720 | + background: unset; |
| 1721 | + } |
| 1722 | + } |
| 1723 | + } |
1659 | 1724 | } |
1660 | 1725 |
|
1661 | 1726 | %indigo-label--focused { |
|
1807 | 1872 | box-shadow: inset 0 0 0 var(--_fluent-input-border-size) var-get($theme, 'border-color'); |
1808 | 1873 | border-radius: inherit; |
1809 | 1874 | } |
| 1875 | + |
| 1876 | + &:has(input:read-only:not(:disabled, [role="combobox"], [type="file"])), |
| 1877 | + &:has(textarea:read-only:not(:disabled)) { |
| 1878 | + igx-prefix, |
| 1879 | + [igxPrefix], |
| 1880 | + igx-suffix, |
| 1881 | + [igxSuffix] { |
| 1882 | + background: transparent; |
| 1883 | + } |
| 1884 | + } |
1810 | 1885 | } |
1811 | 1886 |
|
1812 | | - %form-group-bundle--fluent--hover { |
1813 | | - &::before { |
1814 | | - box-shadow: inset 0 0 0 var(--_fluent-input-border-size) var-get($theme, 'hover-border-color'); |
| 1887 | + %form-group-bundle--fluent--hover:not(:focus-within) { |
| 1888 | + &:has(input:not([readonly])), |
| 1889 | + &:has(textarea:not([readonly])), |
| 1890 | + &:has(input[readonly][role="combobox"]), |
| 1891 | + &:has(input[readonly][type="file"]) { |
| 1892 | + &::before { |
| 1893 | + box-shadow: inset 0 0 0 var(--_fluent-input-border-size) var-get($theme, 'hover-border-color'); |
| 1894 | + } |
1815 | 1895 | } |
1816 | 1896 | } |
1817 | 1897 |
|
|
1832 | 1912 | %form-group-bundle-error--fluent, |
1833 | 1913 | %form-group-bundle-error--fluent--hover, |
1834 | 1914 | %form-group-bundle-error--fluent--focus { |
1835 | | - &::before { |
1836 | | - box-shadow: inset 0 0 0 var(--_fluent-input-border-size) var-get($theme, 'error-secondary-color'); |
| 1915 | + // should be fixed |
| 1916 | + &:has(input:not([readonly])), |
| 1917 | + &:has(textarea:not([readonly])), |
| 1918 | + &:has(input[readonly][role="combobox"]), |
| 1919 | + &:has(input[readonly][type="file"]) { |
| 1920 | + &::before { |
| 1921 | + box-shadow: inset 0 0 0 var(--_fluent-input-border-size) var-get($theme, 'error-secondary-color'); |
| 1922 | + } |
1837 | 1923 | } |
1838 | 1924 | } |
1839 | 1925 |
|
|
2184 | 2270 | transition: box-shadow .15s ease-out, border .15s ease-out; |
2185 | 2271 | } |
2186 | 2272 | } |
| 2273 | + |
| 2274 | + &:has(input:read-only:not(:disabled, [role="combobox"], [type="file"])), |
| 2275 | + &:has(textarea:read-only:not(:disabled)) { |
| 2276 | + %bootstrap-input { |
| 2277 | + background: var-get($theme, 'border-disabled-background'); |
| 2278 | + } |
| 2279 | + |
| 2280 | + igx-prefix, |
| 2281 | + [igxPrefix], |
| 2282 | + igx-suffix, |
| 2283 | + [igxSuffix] { |
| 2284 | + background: var-get($theme, 'border-disabled-background'); |
| 2285 | + } |
| 2286 | + } |
2187 | 2287 | } |
2188 | 2288 |
|
2189 | 2289 | %bootstrap-input, |
|
2240 | 2340 | } |
2241 | 2341 |
|
2242 | 2342 | %bootstrap-input--error { |
2243 | | - border: rem(1px) solid var-get($theme, 'error-secondary-color'); |
| 2343 | + &:not([readonly]), |
| 2344 | + &[role="combobox"] { |
| 2345 | + border: rem(1px) solid var-get($theme, 'error-secondary-color'); |
2244 | 2346 |
|
2245 | | - &:focus { |
2246 | | - box-shadow: 0 0 0 rem(4px) var-get($theme, 'error-shadow-color'); |
2247 | | - |
2248 | | - + %bootstrap-file-input { |
| 2347 | + &:focus { |
2249 | 2348 | box-shadow: 0 0 0 rem(4px) var-get($theme, 'error-shadow-color'); |
| 2349 | + |
| 2350 | + + %bootstrap-file-input { |
| 2351 | + box-shadow: 0 0 0 rem(4px) var-get($theme, 'error-shadow-color'); |
| 2352 | + } |
2250 | 2353 | } |
2251 | 2354 | } |
2252 | 2355 | } |
|
0 commit comments