form-text.pcss.css
Same filename in other branches
Text input elements.
File
-
core/
themes/ olivero/ css/ components/ form-text.pcss.css
View source
- /**
- * @file
- * Text input elements.
- */
-
- @import "../base/variables.pcss.css";
-
- [type="color"],
- [type="date"],
- [type="datetime-local"],
- [type="email"],
- [type="file"],
- [type="month"],
- [type="number"],
- [type="password"],
- [type="search"],
- [type="tel"],
- [type="text"],
- [type="time"],
- [type="url"],
- [type="week"],
- textarea {
- width: 100%;
- max-width: 100%;
- min-height: var(--sp3);
- padding: 0 var(--sp);
- color: var(--color--gray-0);
- border: 1px solid var(--color--gray-30);
- border-radius: var(--border-radius);
- background-color: var(--color--white);
- font-family: inherit;
- font-size: inherit;
- appearance: none;
-
- &:focus {
- border: solid 2px var(--color--blue-50);
- outline: solid 2px var(--color--blue-50);
-
- @supports (outline-style: double) {
- border-width: 1px;
- outline-width: 6px;
- outline-style: double;
- outline-offset: -1px;
- }
- }
-
- &::-ms-clear {
- display: none;
- }
-
- &[disabled] {
- color: var(--color--gray-30);
- background-color: var(--color--gray-90);
- }
-
- &.error {
- border: solid 2px var(--color--red);
-
- &:focus {
- outline-color: var(--color--red);
- outline-offset: -2px;
- }
- & + .ck-editor > .ck-editor__main {
- border: solid 2px var(--color--red);
- }
- }
-
- &.form-element--small {
- min-height: var(--sp2-5);
- }
-
- @media (--sm) {
- width: auto;
- }
- }
-
- [type="date"] {
- /* Ensure that date field isn't larger than other fields. */
- &::-webkit-datetime-edit-fields-wrapper {
- padding-block: 0;
- padding-inline-start: 0;
- padding-inline-end: 0;
- }
- }
-
- [type="file"] {
- height: auto;
- padding-block: var(--sp0-75);
- }
-
- [type="color"] {
- width: var(--sp3);
- padding: 0;
- }
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.