[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-content/themes/twentytwentyone/assets/sass/05-blocks/search/ -> _style.scss (source)

   1  .wp-block-search {
   2      max-width: var(--responsive--aligndefault-width);
   3  
   4      &__button-only.aligncenter {
   5  
   6          .wp-block-search__inside-wrapper {
   7              justify-content: center;
   8          }
   9      }
  10  
  11      .wp-block-search__label {
  12          font-size: var(--form--font-size);
  13          font-weight: var(--form--label-weight);
  14          margin-bottom: calc(var(--global--spacing-vertical) / 3);
  15      }
  16  
  17      .wp-block-search__input {
  18          border: var(--form--border-width) solid var(--form--border-color);
  19          border-radius: var(--form--border-radius);
  20          color: var(--form--color-text);
  21          line-height: var(--form--line-height);
  22          max-width: inherit;
  23          margin-right: calc(-1 * var(--button--border-width));
  24          // Override the default theme style for search input fields.
  25          margin-left: 0;
  26          padding: var(--form--spacing-unit);
  27  
  28          &:focus {
  29              color: var(--form--color-text);
  30              border-color: var(--form--border-color);
  31          }
  32  
  33          .has-background & {
  34              border-color: var(--local--color-primary, var(--global--color-primary)) !important;
  35          }
  36      }
  37  
  38      button.wp-block-search__button {
  39          margin-left: 0;
  40          line-height: 1;
  41  
  42          &.has-icon {
  43              padding: 6px calc(0.5 * var(--button--padding-horizontal));
  44  
  45              svg {
  46                  width: 40px;
  47                  height: 40px;
  48                  fill: currentColor;
  49              }
  50          }
  51  
  52          &:hover,
  53          &:active {
  54  
  55              .has-background & {
  56                  background-color: var(--local--color-background, var(--global--color-background)) !important;
  57                  color: var(--local--color-primary, var(--global--color-primary)) !important;
  58              }
  59  
  60              .has-text-color & {
  61                  color: var(--local--color-primary, var(--global--color-primary)) !important;
  62              }
  63          }
  64      }
  65  
  66      &.wp-block-search__button-inside {
  67  
  68          .wp-block-search__inside-wrapper {
  69              background-color: var(--global--color-white);
  70              border: var(--form--border-width) solid var(--form--border-color);
  71              border-radius: var(--form--border-radius);
  72              padding: var(--form--border-width);
  73  
  74              .has-background & {
  75                  border-color: var(--local--color-primary, var(--global--color-primary)) !important;
  76              }
  77  
  78              .wp-block-search__input {
  79                  margin-left: 0;
  80                  margin-right: 0;
  81                  padding-left: var(--form--spacing-unit);
  82  
  83                  // Add outline for focus styles to override default
  84                  &:focus {
  85                      color: var(--form--color-text);
  86                      outline-offset: -2px;
  87                      outline: 2px dotted var(--form--border-color);
  88                  }
  89              }
  90  
  91              button.wp-block-search__button {
  92                  padding: var(--button--padding-vertical) var(--button--padding-horizontal);
  93  
  94                  // Search button always needs black contrast against white form background
  95                  &:hover {
  96                      color: var(--global--color-dark-gray);
  97                  }
  98  
  99                  .is-dark-theme & {
 100                      color: var(--global--color-dark-gray);
 101  
 102                      &:hover {
 103                          background-color: var(--global--color-dark-gray);
 104                          color: var(--global--color-white);
 105                      }
 106                  }
 107  
 108                  &.has-icon {
 109                      padding: 6px calc(0.5 * var(--button--padding-horizontal));
 110                  }
 111              }
 112          }
 113      }
 114  }
 115  
 116  .wp-block-search__button {
 117      box-shadow: none;
 118  }


Generated : Sun Nov 24 08:20:01 2024 Cross-referenced by PHPXref