Making WordPress.org


Ignore:
Timestamp:
04/08/2024 03:40:30 AM (22 months ago)
Author:
adamwood
Message:

wporg-support-2024: Restyle buttons

Style buttons and associated inputs and textarea to match wporg-parent-2021 styles

Closes https://github.com/WordPress/wordpress.org/issues/229

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support-2024/sass/forms/_fields.scss

    r13272 r13470  
    33/* Include margin and padding in the width calculation of input and textarea. */
    44input,
    5 textarea {
     5textarea,
     6select {
    67    box-sizing: border-box;
    7 }
    8 
    9 input[type="text"],
    10 input[type="password"],
    11 input[type="checkbox"],
    12 input[type="color"],
    13 input[type="date"],
    14 input[type="datetime"],
    15 input[type="datetime-local"],
    16 input[type="email"],
    17 input[type="month"],
    18 input[type="number"],
    19 input[type="password"],
     8    line-height: var(--wp--custom--form--line-height);
     9}
     10
    2011input[type="radio"],
    21 input[type="tel"],
    22 input[type="text"],
    23 input[type="time"],
    24 input[type="url"],
    25 input[type="week"],
    26 select,
    27 textarea {
     12input[type="checkbox"] {
    2813    background-color: #fff;
    2914    border: 1px solid var(--wp--preset--color--light-grey-1);
     
    3823}
    3924
    40 input[type="text"]:focus,
    41 input[type="password"]:focus,
    42 input[type="color"]:focus,
    43 input[type="date"]:focus,
    44 input[type="datetime"]:focus,
    45 input[type="datetime-local"]:focus,
    46 input[type="email"]:focus,
    47 input[type="month"]:focus,
    48 input[type="number"]:focus,
    49 input[type="password"]:focus,
    50 input[type="search"]:focus,
    51 input[type="tel"]:focus,
    52 input[type="text"]:focus,
    53 input[type="time"]:focus,
    54 input[type="url"]:focus,
    55 input[type="week"]:focus,
    5625input[type="checkbox"]:focus,
    57 input[type="radio"]:focus,
    58 select:focus,
    59 textarea:focus {
     26input[type="radio"]:focus {
    6027    border-color: #5b9dd9;
    6128    box-shadow: 0 0 2px rgba( 30, 140, 190, 0.8 );
    62 }
    63 
    64 /* rtl:ignore */
    65 input[type="email"],
    66 input[type="url"] {
    67     direction: ltr;
    68 }
    69 
    70 input[type="text"],
    71 input[type="email"],
    72 input[type="password"],
    73 input[type="number"] {
    74     padding: 6px 10px;
    75 }
    76 
    77 /* Vertically align the number selector with the input. */
    78 input[type="number"] {
    79     height: 40px;
    80     line-height: inherit;
    8129}
    8230
     
    152100}
    153101
     102select {
     103    background: var(--wp--custom--form--color--background);
     104    border: var(--wp--custom--form--border--width) var(--wp--custom--form--border--style) var(--wp--custom--form--border--color);
     105    border-radius: var(--wp--custom--form--border--radius);
     106    box-shadow: var(--wp--custom--form--color--box-shadow);
     107    font-family: inherit;
     108    height: 40px;
     109
     110    &:focus {
     111        border-color: var(--custom--form--color--border);
     112    }
     113}
     114
    154115/* Search */
    155116input[type="search"]::-webkit-search-decoration {
    156117    display: none;
    157 }
    158 
    159 .ie8 input[type="password"] {
    160     font-family: sans-serif;
    161 }
    162 
    163 textarea,
    164 input,
    165 select,
    166 button {
    167     font-family: inherit;
    168     font-size: inherit;
    169     font-weight: inherit;
    170 }
    171 
    172 textarea,
    173 input,
    174 select {
    175     border-radius: 0;
    176     font-size: 16px;
    177     padding: 3px 5px; /* Reset mobile webkit's default element styling */
    178 }
    179 
    180 textarea {
    181     line-height: 1.4;
    182     overflow: auto;
    183     padding: 2px 6px;
    184     resize: vertical;
    185 
    186     .comment-form-comment & {
    187         width: 100%;
    188     }
    189118}
    190119
     
    250179@media screen and ( min-width: 48em ) {
    251180
    252     /* Input Elements */
    253     input[type="text"],
    254     input[type="email"],
    255     input[type="password"],
    256     input[type="number"] {
    257         padding: 0;
    258     }
    259 
    260     input[type="number"] {
    261         height: 28px;
    262     }
    263 
    264181    input[type="checkbox"] {
    265182        padding: 0;
     
    282199        margin: 4px;
    283200    }
    284 
    285     textarea,
    286     input,
    287     select {
    288         font-size: 14px;
    289     }
    290 }
     201}
Note: See TracChangeset for help on using the changeset viewer.