Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2014 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 | :host { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame^] | 8 | padding: 0; |
| 9 | margin: 0; |
| 10 | display: inline-flex; |
| 11 | flex-shrink: 0; |
| 12 | align-items: center !important; |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 13 | } |
| 14 | |
| 15 | input { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame^] | 16 | height: 12px; |
| 17 | width: 12px; |
| 18 | flex-shrink: 0; |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 19 | } |
| 20 | |
Jan Scheffler | cc93308 | 2020-01-15 10:04:20 | [diff] [blame] | 21 | input.inside-datagrid { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame^] | 22 | height: 10px; |
| 23 | width: 10px; |
Jan Scheffler | cc93308 | 2020-01-15 10:04:20 | [diff] [blame] | 24 | } |
| 25 | |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 26 | input:focus { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame^] | 27 | outline: auto 5px -webkit-focus-ring-color; |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 28 | } |
| 29 | |
| 30 | input.dt-checkbox-themed { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame^] | 31 | -webkit-appearance: none; |
| 32 | margin: auto 5px auto 2px; |
| 33 | border: 1px solid rgb(45, 45, 45); |
| 34 | border-radius: 3px; |
| 35 | background-color: rgb(102, 102, 102); |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 36 | } |
| 37 | |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame^] | 38 | input.dt-checkbox-themed::after { |
| 39 | content: ''; |
| 40 | line-height: 10px; |
| 41 | position: absolute; |
| 42 | cursor: pointer; |
| 43 | width: 12px; |
| 44 | height: 12px; |
| 45 | background: none; |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 46 | } |
| 47 | |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame^] | 48 | input.dt-checkbox-themed:checked::after { |
| 49 | background-color: #333; |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 50 | } |
| 51 | |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame^] | 52 | input.dt-checkbox-themed::after { |
| 53 | -webkit-mask-image: url(Images/checkboxCheckmark.svg); |
| 54 | -webkit-mask-size: 11px 11px; |
| 55 | -webkit-mask-position: 0 0; |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 56 | } |
| 57 | |
| 58 | :host-context(.-theme-with-dark-background) input:not(.dt-checkbox-themed) { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame^] | 59 | filter: invert(80%); |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 60 | } |
| 61 | |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 62 | .dt-checkbox-text { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame^] | 63 | margin-left: 3px; |
| 64 | overflow: hidden; |
| 65 | text-overflow: ellipsis; |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 66 | } |
| 67 | |
| 68 | .dt-checkbox-subtitle { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame^] | 69 | color: gray; |
Blink Reformat | 4c46d09 | 2018-04-07 15:32:37 | [diff] [blame] | 70 | } |
Kham Udom | 047cb69 | 2020-02-03 22:30:11 | [diff] [blame] | 71 | |
| 72 | @media (forced-colors: active) { |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame^] | 73 | input.dt-checkbox-theme-preserve { |
| 74 | forced-color-adjust: none; |
Kham Udom | 047cb69 | 2020-02-03 22:30:11 | [diff] [blame] | 75 | } |
Mathias Bynens | b0c1f4b | 2020-05-15 14:34:41 | [diff] [blame^] | 76 | |
| 77 | input.dt-checkbox-theme-preserve:hover:enabled { |
| 78 | border-color: Highlight; |
| 79 | } |
| 80 | |
| 81 | input.dt-checkbox-theme-preserve:active::before, |
| 82 | input.dt-checkbox-theme-preserve:active::after { |
| 83 | background-color: Highlight; |
| 84 | } |
| 85 | |
| 86 | input.dt-checkbox-theme-preserve:active { |
| 87 | background: HighlightText; |
| 88 | } |
| 89 | |
| 90 | input.dt-checkbox-theme-preserve:active:checked::before, |
| 91 | input.dt-checkbox-theme-preserve:active:checked::after, |
| 92 | input.dt-checkbox-theme-preserve:checked::before, |
| 93 | input.dt-checkbox-theme-preserve:checked::after { |
| 94 | background-color: HighlightText; |
| 95 | } |
| 96 | |
| 97 | input.dt-checkbox-theme-preserve:active:checked, |
| 98 | input.dt-checkbox-theme-preserve:checked { |
| 99 | background: Highlight; |
| 100 | border-color: Highlight; |
| 101 | } |
| 102 | |
| 103 | input.dt-checkbox-theme-preserve:hover:checked::before, |
| 104 | input.dt-checkbox-theme-preserve:hover:checked::after { |
| 105 | background-color: Highlight !important; |
| 106 | } |
| 107 | |
| 108 | input.dt-checkbox-theme-preserve:hover:checked { |
| 109 | background: HighlightText; |
| 110 | } |
| 111 | } |