Alex Rudenko | e4465d1 | 2021-08-09 11:37:37 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2021 The Chromium Authors. All rights reserved. |
| 3 | * Use of this source code is governed by a BSD-style license that can be |
| 4 | * found in the LICENSE file. |
| 5 | */ |
| 6 | |
| 7 | * { |
| 8 | margin: 0; |
| 9 | padding: 0; |
| 10 | box-sizing: border-box; |
| 11 | } |
| 12 | |
Alex Rudenko | dc7c959 | 2021-09-30 09:00:55 | [diff] [blame] | 13 | /** |
| 14 | * Reset default UA styles for focused elements. |
| 15 | * The button styles below explicitly implement custom focus styles. |
| 16 | */ |
Alex Rudenko | e4465d1 | 2021-08-09 11:37:37 | [diff] [blame] | 17 | *:focus, |
Alex Rudenko | dc7c959 | 2021-09-30 09:00:55 | [diff] [blame] | 18 | *:focus-visible, |
| 19 | :host(:focus), |
| 20 | :host(:focus-visible) { |
Alex Rudenko | e4465d1 | 2021-08-09 11:37:37 | [diff] [blame] | 21 | outline: none; |
| 22 | } |
| 23 | |
Alex Rudenko | e6ba352 | 2021-10-15 06:09:48 | [diff] [blame^] | 24 | :host { |
| 25 | display: inline-flex; |
| 26 | flex-direction: row; |
| 27 | } |
| 28 | |
Alex Rudenko | e4465d1 | 2021-08-09 11:37:37 | [diff] [blame] | 29 | button { |
Alex Rudenko | e4465d1 | 2021-08-09 11:37:37 | [diff] [blame] | 30 | align-items: center; |
| 31 | border-radius: 4px; |
Alex Rudenko | cc459b9 | 2021-08-11 13:53:48 | [diff] [blame] | 32 | display: inline-flex; |
| 33 | font-family: inherit; |
Alex Rudenko | e4465d1 | 2021-08-09 11:37:37 | [diff] [blame] | 34 | font-size: 12px; |
Alex Rudenko | e6ba352 | 2021-10-15 06:09:48 | [diff] [blame^] | 35 | height: 24px; |
Alex Rudenko | e4465d1 | 2021-08-09 11:37:37 | [diff] [blame] | 36 | line-height: 14px; |
| 37 | padding: 5px 12px; |
Alex Rudenko | 50b3a3e | 2021-09-29 11:01:46 | [diff] [blame] | 38 | justify-content: center; |
| 39 | width: 100%; |
Alex Rudenko | cc459b9 | 2021-08-11 13:53:48 | [diff] [blame] | 40 | } |
| 41 | |
Alex Rudenko | 1a41fb4 | 2021-09-30 09:12:14 | [diff] [blame] | 42 | button.small { |
| 43 | height: 18px; |
| 44 | border-radius: 2px; |
| 45 | } |
| 46 | |
Alex Rudenko | cc459b9 | 2021-08-11 13:53:48 | [diff] [blame] | 47 | button:focus-visible { |
| 48 | box-shadow: 0 0 0 2px var(--color-button-outline-focus); |
| 49 | } |
| 50 | |
| 51 | button:hover { |
| 52 | cursor: pointer; |
Alex Rudenko | e4465d1 | 2021-08-09 11:37:37 | [diff] [blame] | 53 | } |
| 54 | |
Alex Rudenko | e6ba352 | 2021-10-15 06:09:48 | [diff] [blame^] | 55 | button.toolbar { |
| 56 | background: transparent; |
| 57 | border-radius: 2px; |
| 58 | border: none; |
| 59 | cursor: pointer; |
| 60 | height: 24px; |
| 61 | width: 24px; |
| 62 | overflow: hidden; |
| 63 | padding: 0; |
| 64 | white-space: nowrap; |
| 65 | } |
| 66 | |
| 67 | button.toolbar.small { |
| 68 | height: 18px; |
| 69 | width: 18px; |
| 70 | } |
| 71 | |
Alex Rudenko | e4465d1 | 2021-08-09 11:37:37 | [diff] [blame] | 72 | button.primary { |
| 73 | border: 1px solid var(--color-primary); |
| 74 | background: var(--color-primary); |
| 75 | color: var(--color-background); |
| 76 | } |
| 77 | |
Alex Rudenko | cc459b9 | 2021-08-11 13:53:48 | [diff] [blame] | 78 | button.primary:hover { |
| 79 | background: var(--color-button-primary-background-hovering); |
| 80 | border: 1px solid var(--color-button-primary-background-hovering); |
Alex Rudenko | e4465d1 | 2021-08-09 11:37:37 | [diff] [blame] | 81 | } |
| 82 | |
Alex Rudenko | cc459b9 | 2021-08-11 13:53:48 | [diff] [blame] | 83 | button.primary:active { |
| 84 | background: var(--color-button-primary-background-pressed); |
| 85 | border: 1px solid var(--color-button-primary-background-pressed); |
| 86 | } |
| 87 | |
| 88 | button.secondary { |
| 89 | border: 1px solid var(--color-details-hairline); |
| 90 | background: var(--color-background); |
| 91 | color: var(--color-primary); |
| 92 | } |
| 93 | |
| 94 | button.secondary:hover { |
| 95 | background: var(--color-button-secondary-background-hovering); |
| 96 | } |
| 97 | |
| 98 | button.secondary:active { |
| 99 | background: var(--color-button-secondary-background-pressed); |
| 100 | border: 1px solid var(--color-button-secondary-background-pressed); |
| 101 | } |
| 102 | |
| 103 | button.secondary:focus-visible { |
| 104 | border: 1px solid var(--color-background); |
| 105 | } |
| 106 | |
Alex Rudenko | dc7c959 | 2021-09-30 09:00:55 | [diff] [blame] | 107 | button.secondary:active:focus-visible { |
| 108 | border: 1px solid var(--color-button-secondary-background-pressed); |
| 109 | } |
| 110 | |
Alex Rudenko | e6ba352 | 2021-10-15 06:09:48 | [diff] [blame^] | 111 | button.toolbar:hover { |
| 112 | background-color: var(--color-button-secondary-background-hovering); |
| 113 | } |
| 114 | |
| 115 | button.toolbar:active { |
| 116 | background-color: var(--color-button-secondary-background-pressed); |
| 117 | } |
| 118 | |
| 119 | button.toolbar:focus-visible { |
| 120 | background-color: var(--color-background-elevation-2); |
| 121 | } |
| 122 | |
Alex Rudenko | 50b3a3e | 2021-09-29 11:01:46 | [diff] [blame] | 123 | button.text-with-icon { |
Alex Rudenko | cc459b9 | 2021-08-11 13:53:48 | [diff] [blame] | 124 | padding: 0 12px 0 4px; |
Alex Rudenko | e4465d1 | 2021-08-09 11:37:37 | [diff] [blame] | 125 | } |
| 126 | |
Alex Rudenko | 1a41fb4 | 2021-09-30 09:12:14 | [diff] [blame] | 127 | button.small.text-with-icon { |
| 128 | padding: 0 9px 0 3px; |
| 129 | } |
| 130 | |
Alex Rudenko | 50b3a3e | 2021-09-29 11:01:46 | [diff] [blame] | 131 | button.only-icon { |
| 132 | padding: 0; |
| 133 | } |
| 134 | |
Alex Rudenko | e4465d1 | 2021-08-09 11:37:37 | [diff] [blame] | 135 | button devtools-icon { |
| 136 | width: 19px; |
| 137 | height: 19px; |
Alex Rudenko | e4465d1 | 2021-08-09 11:37:37 | [diff] [blame] | 138 | } |
| 139 | |
Alex Rudenko | e6ba352 | 2021-10-15 06:09:48 | [diff] [blame^] | 140 | button.toolbar devtools-icon { |
| 141 | width: 24px; |
| 142 | height: 24px; |
| 143 | |
| 144 | --icon-color: var(--color-text-primary); |
Alex Rudenko | 1a41fb4 | 2021-09-30 09:12:14 | [diff] [blame] | 145 | } |
| 146 | |
Alex Rudenko | e4465d1 | 2021-08-09 11:37:37 | [diff] [blame] | 147 | button.primary devtools-icon { |
| 148 | --icon-color: var(--color-background); |
| 149 | } |
Alex Rudenko | cc459b9 | 2021-08-11 13:53:48 | [diff] [blame] | 150 | |
| 151 | button.secondary devtools-icon { |
| 152 | --icon-color: var(--color-primary); |
| 153 | } |
Alex Rudenko | e6ba352 | 2021-10-15 06:09:48 | [diff] [blame^] | 154 | |
| 155 | button.small devtools-icon { |
| 156 | width: 14px; |
| 157 | height: 14px; |
| 158 | } |
| 159 | |
| 160 | button.toolbar.small devtools-icon { |
| 161 | width: 18px; |
| 162 | height: 18px; |
| 163 | } |