UNPKG

@codegouvfr/react-dsfr

Version:

French State Design System React integration library

159 lines (137 loc) 3.31 kB
/*! * DSFR v1.10.2 | SPDX-License-Identifier: MIT | License-Filename: LICENSE.md | restricted use (see terms and conditions) */ @charset "UTF-8"; /* ¯¯¯¯¯¯¯¯¯ *\ SEARCH \* ˍˍˍˍˍˍˍˍˍ */ .fr-search-bar { display: flex; flex-direction: row; } .fr-search-bar .fr-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; /* added line */ border: 0; } .fr-search-bar .fr-input { margin: 0; border-radius: 0.25rem 0 0; max-height: 2.5rem; /* TODO: intégrer la croix en background pour effacer la search bar &::-webkit-search-cancel-button { -webkit-appearance: none; } */ box-shadow: inset 0 -2px 0 0 var(--border-action-high-blue-france); /** * Modificateur pour le champ validés */ /** * Modificateur pour le champ présentant des erreurs */ /** * Modificateur pour le champ validés */ /** * Modificateur pour le champ présentant des erreurs */ } .fr-search-bar .fr-input::placeholder { font-style: italic; } .fr-search-bar .fr-btn { font-size: 1rem; line-height: 1.5rem; min-height: 2.5rem; padding: 0.5rem 1rem; overflow: hidden; white-space: nowrap; max-width: 2.5rem; max-height: 2.5rem; padding-left: 0.5rem; padding-right: 0.5rem; flex: 1 0 auto; border-radius: 0 0.25rem 0 0; } .fr-search-bar .fr-btn::before { --icon-size: 1.5rem; margin-left: 0; margin-right: 0.5rem; flex: 0 0 auto; display: inline-block; vertical-align: calc((0.75em - var(--icon-size)) * 0.5); background-color: currentColor; width: var(--icon-size); height: var(--icon-size); -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-image: url("../../icons/system/search-line.svg"); mask-image: url("../../icons/system/search-line.svg"); content: ""; } .fr-search-bar .fr-input--valid { box-shadow: inset 0 -2px 0 0 var(--border-plain-success); } .fr-search-bar .fr-input--error { box-shadow: inset 0 -2px 0 0 var(--border-plain-error); } @media (min-width: 36em) { /*! media sm */ /*! media sm */ } @media (min-width: 48em) { /*! media md */ .fr-search-bar--lg .fr-btn { font-size: 1.125rem; line-height: 1.75rem; min-height: 3rem; padding: 0.5rem 1.5rem; overflow: initial; max-width: 100%; max-height: none; } .fr-search-bar--lg .fr-btn::before { --icon-size: 1.5rem; margin-left: -0.1875rem; margin-right: 0.5rem; } .fr-search-bar--lg .fr-input { max-height: 3rem; } /*! media md */ } @media (min-width: 62em) { /*! media lg */ /*! media lg */ } @media (min-width: 78em) { /*! media xl */ /*! media xl */ } @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { .fr-search-bar .fr-btn::before, .fr-search-bar .fr-btn::after { background-color: transparent; background-size: 100%; background-repeat: no-repeat; background-image: url("../../icons/system/search-line.svg"); width: 1.5rem; height: 1.5rem; } .fr-search-bar .fr-input { box-shadow: inset 0 -2px 0 0 #000091; } .fr-search-bar .fr-input--valid { box-shadow: inset 0 -2px 0 0 #18753c; } .fr-search-bar .fr-input--error { box-shadow: inset 0 -2px 0 0 #ce0500; } }