onMouseOverRow(obj.id)}>
@@ -87,7 +87,7 @@ export default class BrowserRow extends Component {
left: 0,
zIndex: 1,
background: rowBackground,
- borderBottom: '1px solid #e3e3ea',
+ borderBottom: '1px solid var(--color-border-secondary)',
}}
>
diff --git a/src/components/Button/Button.react.js b/src/components/Button/Button.react.js
index 5b878fe903..f6bc29db9e 100644
--- a/src/components/Button/Button.react.js
+++ b/src/components/Button/Button.react.js
@@ -74,7 +74,7 @@ Button.propTypes = {
'Determines whether a button can be clicked. Disabled buttons will ' +
'appear grayed out, and will not fire onClick events.'
),
- color: PropTypes.oneOf(['blue', 'green', 'red', 'white']).describe('The color of the button.'),
+ color: PropTypes.oneOf(['blue', 'green', 'red', 'white', 'ghost']).describe('The color of the button.'),
onClick: PropTypes.func.describe('A function to be called when the button is clicked.'),
value: PropTypes.string.isRequired.describe(
'The content of the button. This can be any renderable content.'
diff --git a/src/components/Button/Button.scss b/src/components/Button/Button.scss
index 1b37c76540..4503cb9dd6 100644
--- a/src/components/Button/Button.scss
+++ b/src/components/Button/Button.scss
@@ -8,95 +8,125 @@
@import 'stylesheets/globals.scss';
.button {
- @include DosisFont;
- @include buttonReset($bg: none, $border: 1px solid $blue, $padding: 0 16px);
+ @include UIFont;
+ @include buttonReset($bg: var(--btn-bg), $border: var(--btn-border), $padding: 0 16px);
display: inline-block;
- height: 30px;
- line-height: 28px;
+ height: 36px;
+ line-height: 36px;
outline: 0;
text-decoration: none;
text-align: center;
- border-radius: 5px;
- font-size: 14px;
-
- color: $blue;
+ border-radius: var(--btn-radius);
+ font-size: var(--text-base);
+ font-weight: var(--font-weight-medium);
+ color: var(--btn-color);
+ transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
&:hover, &:focus {
- background-color: $blue;
- color: white;
+ background: var(--btn-hover-bg);
+ color: var(--btn-hover-color);
+ border-color: var(--color-border-primary);
}
}
.primary {
- background-color: $blue;
- color: $white;
+ background: var(--btn-primary-bg);
+ color: var(--btn-primary-color);
+ border: var(--btn-primary-border);
&:hover, &:focus {
- background-color: $darkBlue;
+ background: var(--btn-primary-hover-bg);
+ border-color: var(--btn-primary-hover-bg);
+ color: var(--btn-primary-color);
}
}
.green {
- color: $green;
- border-color: $green;
+ color: var(--color-accent-green);
+ background: var(--color-accent-green-light);
+ border-color: transparent;
&:hover, &:focus {
- background-color: $lightGreen;
+ background: var(--color-accent-green);
+ color: var(--color-text-on-dark);
+ border-color: transparent;
}
&.primary {
- background-color: $green;
- color: $white;
+ background: var(--color-accent-green);
+ color: var(--color-text-on-dark);
+ border-color: transparent;
&:hover, &:focus {
- background-color: $darkGreen;
+ background: var(--color-accent-green);
+ filter: brightness(0.9);
}
}
}
.red {
- color: $red;
- border-color: $red;
+ color: var(--color-accent-red);
+ background: var(--color-accent-red-light);
+ border-color: transparent;
&:hover, &:focus {
- background-color: $lightRed;
+ background: var(--color-accent-red);
+ color: var(--color-text-on-dark);
+ border-color: transparent;
}
&.primary {
- background-color: $red;
- color: $white;
+ background: var(--color-accent-red);
+ color: var(--color-text-on-dark);
+ border-color: transparent;
&:hover, &:focus {
- background-color: $darkRed;
+ background: var(--color-accent-red);
+ filter: brightness(0.9);
}
}
}
+// Ghost: transparent bg, subtle hover — for Cancel / tertiary actions
+.ghost {
+ color: var(--color-text-secondary);
+ background: transparent;
+ border-color: transparent;
+
+ &:hover, &:focus {
+ background: var(--color-interactive-hover);
+ color: var(--color-text-primary);
+ border-color: transparent;
+ }
+}
+
.white {
- color: $white;
- border-color: $white;
- line-height: 28px;
+ color: var(--color-text-on-dark);
+ border-color: rgba(255, 255, 255, 0.3);
+ background: rgba(255, 255, 255, 0.1);
&:hover, &:focus {
- background-color: $white;
- color: $blue;
+ background: rgba(255, 255, 255, 0.2);
+ color: var(--color-text-on-dark);
+ border-color: rgba(255, 255, 255, 0.4);
}
&.primary {
- background-color: $white;
- color: $blue;
+ background: var(--color-text-on-dark);
+ color: var(--color-accent-blue);
+ border-color: transparent;
&:hover, &:focus {
- background-color: $blue;
- border-color: $blue;
- color: white;
+ background: rgba(255, 255, 255, 0.9);
+ border-color: transparent;
+ color: var(--color-accent-blue);
}
}
&.disabled {
- background-color: transparent;
- border-color: white;
- opacity: 0.2;
+ background: transparent;
+ border-color: rgba(255, 255, 255, 0.15);
+ opacity: 0.3;
}
}
@@ -109,14 +139,15 @@
}
.disabled, .disabled.primary {
- background-color: #e0e0ea;
- border-color: #e0e0ea;
- color: white;
+ background: var(--color-bg-tertiary);
+ border-color: transparent;
+ color: var(--color-text-tertiary);
cursor: default;
- &:hover{
- background-color: #e0e0ea;
- border-color: #e0e0ea;
- color: white;
+
+ &:hover {
+ background: var(--color-bg-tertiary);
+ border-color: transparent;
+ color: var(--color-text-tertiary);
}
}
@@ -128,4 +159,3 @@
background-position: 150% 0;
}
}
-
diff --git a/src/components/Calendar/Calendar.scss b/src/components/Calendar/Calendar.scss
index f178332267..3eb4bf9ff9 100644
--- a/src/components/Calendar/Calendar.scss
+++ b/src/components/Calendar/Calendar.scss
@@ -8,24 +8,25 @@
@import 'stylesheets/globals.scss';
.calendar {
- background: white;
- color: $blue;
+ background: var(--color-bg-elevated);
+ color: var(--color-accent-blue);
width: 182px;
height: auto;
}
.month {
- margin-bottom: 10px;
+ margin-bottom: var(--space-3);
button {
- @include buttonReset($border: 1px solid $blue);
+ @include buttonReset($border: 1px solid var(--color-accent-blue));
position: relative;
display: inline-block;
width: 14px;
height: 14px;
- border-radius: 100%;
+ border-radius: var(--radius-full);
opacity: 0.5;
- margin: 0 6px;
+ margin: 0 var(--space-2);
+ transition: opacity var(--transition-fast);
&:hover {
opacity: 1;
@@ -37,7 +38,7 @@
&:before {
content: '';
position: absolute;
- @include arrow('left', 8px, 4px, $blue);
+ @include arrow('left', 8px, 4px, var(--color-accent-blue));
top: 2px;
left: 4px;
}
@@ -45,7 +46,7 @@
&:after {
content: '';
position: absolute;
- @include arrow('left', 8px, 4px, white);
+ @include arrow('left', 8px, 4px, var(--color-bg-elevated));
top: 2px;
left: 5px;
}
@@ -57,7 +58,7 @@
&:before {
content: '';
position: absolute;
- @include arrow('right', 8px, 4px, $blue);
+ @include arrow('right', 8px, 4px, var(--color-accent-blue));
top: 2px;
left: 4px;
}
@@ -65,7 +66,7 @@
&:after {
content: '';
position: absolute;
- @include arrow('right', 8px, 4px, white);
+ @include arrow('right', 8px, 4px, var(--color-bg-elevated));
top: 2px;
left: 3px;
}
@@ -73,22 +74,22 @@
}
div {
- font-size: 14px;
+ font-size: var(--text-base);
text-align: center;
}
}
.weekdays {
opacity: 0.5;
- font-size: 12px;
- margin-bottom: 8px;
+ font-size: var(--text-xs);
+ margin-bottom: var(--space-2);
span {
display: inline-block;
width: 26px;
height: 13px;
line-height: 13px;
- font-size: 13px;
+ font-size: var(--text-sm);
text-align: center;
}
}
@@ -101,34 +102,44 @@
width: 26px;
height: 20px;
line-height: 20px;
- font-size: 12px;
+ font-size: var(--text-xs);
text-align: center;
margin: 0;
- color: $blue;
+ color: var(--color-accent-blue);
+ border-radius: var(--radius-sm);
+ transition: background var(--transition-fast), color var(--transition-fast);
+
+ &:hover {
+ background: var(--color-interactive-hover);
+ }
}
.selected {
- color: white;
- background: $darkBlue;
+ color: var(--color-text-on-dark);
+ background: var(--color-accent-blue-hover);
+
+ &:hover {
+ background: var(--color-accent-blue);
+ }
}
}
.shadeBefore {
a {
- background: #efeff1;
+ background: var(--color-bg-tertiary);
}
.selected {
- background: $darkBlue;
+ background: var(--color-accent-blue-hover);
}
.selected ~ button {
- background: white;
+ background: var(--color-bg-elevated);
}
}
.shadeAfter {
.selected ~ button {
- background: #efeff1;
+ background: var(--color-bg-tertiary);
}
}
diff --git a/src/components/CascadingView/CascadingView.scss b/src/components/CascadingView/CascadingView.scss
index ab55ff1050..356e0f422b 100644
--- a/src/components/CascadingView/CascadingView.scss
+++ b/src/components/CascadingView/CascadingView.scss
@@ -7,7 +7,7 @@
*/
@import 'stylesheets/globals.scss';
-$arrowColor: #343445;
+$arrowColor: var(--color-accent-purple);
.cascadingView, .contentContainer {
position: relative;
@@ -29,6 +29,11 @@ $arrowColor: #343445;
.arrow {
@include buttonReset;
+ transition: opacity var(--transition-fast);
+
+ &:hover {
+ opacity: 0.8;
+ }
}
.expanded {
@@ -43,11 +48,11 @@ $arrowColor: #343445;
.childrenContainer {
position: relative;
- padding: 15px 0px 15px 18px;
- background-color: $inputBackgroundColor;
+ padding: var(--space-4) 0 var(--space-4) var(--space-4);
+ background-color: var(--color-bg-tertiary);
.children {
- border-left: 1px solid rgba(52, 52, 69, 0.2);
- padding-left: 14px;
+ border-left: 1px solid var(--color-border-secondary);
+ padding-left: var(--space-3);
}
}
diff --git a/src/components/CategoryList/CategoryList.react.js b/src/components/CategoryList/CategoryList.react.js
index 931e300ef9..e909008b10 100644
--- a/src/components/CategoryList/CategoryList.react.js
+++ b/src/components/CategoryList/CategoryList.react.js
@@ -17,7 +17,6 @@ export default class CategoryList extends React.Component {
static contextType = CurrentApp;
constructor() {
super();
- this.listWrapperRef = React.createRef();
this.state = {
openClasses: [],
hoveredFilter: null,
@@ -26,14 +25,7 @@ export default class CategoryList extends React.Component {
}
componentDidMount() {
- const listWrapper = this.listWrapperRef.current;
- if (listWrapper) {
- this.highlight = document.createElement('div');
- this.highlight.className = styles.highlight;
- listWrapper.appendChild(this.highlight);
- this._autoExpandForSelectedFilter();
- this._updateHighlight();
- }
+ this._autoExpandForSelectedFilter();
}
componentDidUpdate(prevProps) {
@@ -42,13 +34,6 @@ export default class CategoryList extends React.Component {
if (prevProps.params !== this.props.params || prevProps.categories !== this.props.categories) {
this._autoExpandForSelectedFilter();
}
- this._updateHighlight();
- }
-
- componentWillUnmount() {
- if (this.highlight) {
- this.highlight.parentNode.removeChild(this.highlight);
- }
}
_findMatchingFilterIndex(filters, queryFilter, queryFilterId) {
@@ -98,40 +83,6 @@ export default class CategoryList extends React.Component {
}
}
- _updateHighlight() {
- if (this.highlight) {
- let height = 0;
- for (let i = 0; i < this.props.categories.length; i++) {
- const c = this.props.categories[i];
- const id = c.id || c.name;
- if (id === this.props.current) {
- if (this.state.openClasses.includes(id)) {
- const query = new URLSearchParams(this.props.params);
- if (query.has('filters')) {
- const queryFilter = query.get('filters');
- const filterId = query.get('filterId');
- const matchIndex = this._findMatchingFilterIndex(c.filters, queryFilter, filterId);
- if (matchIndex !== -1) {
- height += (matchIndex + 1) * 20;
- }
- }
- }
- this.highlight.style.display = 'block';
- this.highlight.style.top = height + 'px';
- return;
- }
- if (id === 'classSeparator') {
- height += 13;
- } else if (this.state.openClasses.includes(id)) {
- height = height + 20 * (c.filters.length + 1);
- } else {
- height += 20;
- }
- }
- this.highlight.style.display = 'none';
- }
- }
-
toggleDropdown(e, id) {
e.preventDefault();
const openClasses = [...this.state.openClasses];
@@ -149,12 +100,15 @@ export default class CategoryList extends React.Component {
return null;
}
return (
-
+
{this.props.categories.map(c => {
const id = c.id || c.name;
if (c.type === 'separator') {
return
;
}
+ if (c.type === 'sectionHeader') {
+ return
{c.name}
;
+ }
const count = c.count;
let className = id === this.props.current ? styles.active : '';
let selectedFilter = null;
diff --git a/src/components/CategoryList/CategoryList.scss b/src/components/CategoryList/CategoryList.scss
index f5a1e65961..6ba73db56c 100644
--- a/src/components/CategoryList/CategoryList.scss
+++ b/src/components/CategoryList/CategoryList.scss
@@ -10,29 +10,32 @@
.class_list {
position: relative;
margin-bottom: 5px;
- border-left: 1px solid #3e87b2;
+ margin-left: 8px;
a {
display: block;
- padding-left: 12px;
- height: 20px;
- line-height: 20px;
- color: #8fb9cf;
- font-size: 12px;
+ padding-left: 8px;
+ height: 24px;
+ line-height: 24px;
+ color: var(--color-text-on-dark-muted);
+ font-size: var(--text-sm);
+ border-radius: var(--radius-md);
+ transition: color var(--transition-fast);
&.active {
- color: white;
+ color: var(--color-text-on-dark);
+ font-weight: var(--font-weight-medium);
}
- &:hover{
- color: white;
+ &:hover {
+ color: var(--color-text-on-dark);
}
span {
display: block;
&:first-of-type {
- @include DosisFont;
+ @include UIFont;
float: right;
width: 50px;
text-align: right;
@@ -47,17 +50,26 @@
}
}
-.highlight {
- position: absolute;
- width: 1px;
- height: 20px;
- background: white;
- transition: top 0.2s cubic-bezier(1, 0, 0, 1);
+
+.sectionHeader {
+ @include UIFont;
+ font-size: 10px;
+ font-weight: var(--font-weight-medium);
+ text-transform: uppercase;
+ letter-spacing: 1px;
+ color: var(--color-text-on-dark-muted);
+ padding: 12px 8px 4px;
+ line-height: 1;
+ opacity: 0.6;
+
+ &:first-child {
+ padding-top: 4px;
+ }
}
.separator {
margin: 6px 0 6px 12px;
- background-color: #3e87b2;
+ background-color: rgba(255, 255, 255, 0.1);
border: 0;
height: 1px;
}
@@ -74,26 +86,40 @@
margin-right: 20px;
padding-left: 0px !important;
&:after {
- @include arrow('down', 10px, 7px, #8fb9cf);
+ @include arrow('down', 10px, 7px, var(--color-text-on-dark-muted));
content: '';
margin-left: 6px;
}
}
.link {
display: flex;
+ align-items: center;
+ border-radius: var(--radius-md);
+ transition: background var(--transition-fast);
+
+ &:has(a.active) {
+ background: rgba(255, 255, 255, 0.08);
+ }
+
+ &:hover {
+ background: rgba(255, 255, 255, 0.04);
+ }
+
a {
&:first-of-type {
flex-grow: 1
}
}
.count {
- @include DosisFont;
- color: #8fb9cf;
- font-size: 12px;
+ @include UIFont;
+ color: var(--color-text-on-dark-muted);
+ font-size: 11px;
margin-left: auto;
margin-right: 4px;
min-width: 20px;
text-align: right;
+ opacity: 0.6;
+ line-height: 24px;
}
.edit {
display: flex;
@@ -101,11 +127,11 @@
padding-top: 2px;
cursor: pointer;
svg {
- fill: #8fb9cf;
+ fill: var(--color-text-on-dark-muted);
}
&:hover {
svg {
- fill: white;
+ fill: var(--color-text-on-dark);
}
}
}
@@ -123,7 +149,7 @@
text-align: left !important;
margin-left: 14px;
margin-right: 0px !important;
- font-family: Dosis, "Helvetica Neue", Helvetica, Arial, sans-serif;
+ @include UIFont;
flex-grow: 1;
}
}
@@ -133,11 +159,11 @@
padding-top: 2px;
cursor: pointer;
svg {
- fill: #8fb9cf;
+ fill: var(--color-text-on-dark-muted);
}
&:hover {
svg {
- fill: white;
+ fill: var(--color-text-on-dark);
}
}
}
diff --git a/src/components/Chart/Chart.scss b/src/components/Chart/Chart.scss
index cfb9db67bb..bef041c433 100644
--- a/src/components/Chart/Chart.scss
+++ b/src/components/Chart/Chart.scss
@@ -9,7 +9,7 @@
.chart {
position: relative;
- background: white;
+ background: var(--color-bg-primary);
padding: 0 0 40px 40px;
}
@@ -23,25 +23,25 @@
.label {
position: absolute;
- right: 10px;
- font-size: 10px;
+ right: var(--space-2);
+ font-size: var(--text-xs);
margin-top: -6px;
+ color: var(--color-text-secondary);
}
.tick {
@include transform(translateX(-50%));
position: absolute;
bottom: 14px;
- font-size: 10px;
+ font-size: var(--text-xs);
+ color: var(--color-text-secondary);
}
.grow {
@include transform(scale(1));
- transition: transform 0.2s ease-out;
- -webkit-transition: -webkit-transform 0.2s ease-out;
+ transition: transform var(--transition-fast);
transform-origin: 50% 50%;
- -webkit-transform-origin: 50% 50%;
&:hover {
@include transform(scale(2));
@@ -55,10 +55,11 @@
.popup {
@include transform(translateY(-50%));
position: absolute;
- border-radius: 5px;
- border: 1px solid $blue;
- background: white;
- padding: 8px 8px;
+ border-radius: var(--radius-md);
+ border: 1px solid var(--color-accent-blue);
+ background: var(--color-bg-elevated);
+ box-shadow: var(--shadow-md);
+ padding: var(--space-2);
text-align: center;
min-width: 140px;
}
@@ -76,7 +77,7 @@
}
&:after {
- @include arrow('right', 12px, 8px, white);
+ @include arrow('right', 12px, 8px, var(--color-bg-elevated));
content: '';
position: absolute;
right: -7px;
@@ -98,7 +99,7 @@
}
&:after {
- @include arrow('left', 12px, 8px, white);
+ @include arrow('left', 12px, 8px, var(--color-bg-elevated));
content: '';
position: absolute;
left: -7px;
@@ -109,10 +110,13 @@
.popupTime {
white-space: nowrap;
- font-size: 10px;
- margin-bottom: 4px;
+ font-size: var(--text-xs);
+ margin-bottom: var(--space-1);
+ color: var(--color-text-secondary);
}
.popupValue {
- font-size: 12px;
+ font-size: var(--text-xs);
+ font-weight: var(--font-weight-medium);
+ color: var(--color-text-primary);
}
diff --git a/src/components/Checkbox/Checkbox.react.js b/src/components/Checkbox/Checkbox.react.js
index 69251749de..bda2909ed4 100644
--- a/src/components/Checkbox/Checkbox.react.js
+++ b/src/components/Checkbox/Checkbox.react.js
@@ -18,7 +18,7 @@ const Checkbox = ({ label, checked, indeterminate, onChange }) => {
}
let inner = null;
if (checked) {
- inner =
;
+ inner =
;
} else if (indeterminate) {
inner =
;
}
diff --git a/src/components/Checkbox/Checkbox.scss b/src/components/Checkbox/Checkbox.scss
index 2e2b23a4d8..93d9a5b450 100644
--- a/src/components/Checkbox/Checkbox.scss
+++ b/src/components/Checkbox/Checkbox.scss
@@ -15,14 +15,16 @@
}
.checkbox {
- display: inline-block;
- height: 20px;
- width: 20px;
- padding: 3px;
- border-radius: 4px;
- background: white;
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ height: 18px;
+ width: 18px;
+ border-radius: var(--radius-sm);
+ background: var(--color-bg-primary);
vertical-align: middle;
- border: 1px solid $mainTextColor;
+ border: 1px solid var(--color-border-primary);
+ transition: border-color var(--transition-fast), background var(--transition-fast);
svg {
vertical-align: top;
@@ -31,27 +33,27 @@
.minus {
display: block;
- width: 12px;
- height: 4px;
- background: $blue;
- margin-top: 4px;
- border-radius: 2px;
+ width: 10px;
+ height: 2px;
+ background: var(--color-bg-primary);
+ border-radius: 1px;
}
.label {
- @include DosisFont;
- color: $mainTextColor;
- font-size: 14px;
+ @include UIFont;
+ color: var(--color-text-secondary);
+ font-size: var(--text-base);
vertical-align: middle;
margin-right: 6px;
}
.checked, .indeterminate {
.checkbox {
- border-color: $blue;
+ background: var(--color-accent-blue);
+ border-color: var(--color-accent-blue);
}
.label {
- color: $blue;
+ color: var(--color-text-primary);
}
}
diff --git a/src/components/Chip/Chip.scss b/src/components/Chip/Chip.scss
index 7d28e421a1..8bcd9fee7c 100644
--- a/src/components/Chip/Chip.scss
+++ b/src/components/Chip/Chip.scss
@@ -9,22 +9,28 @@
.chip {
display: inline-flex;
flex-direction: row;
- background-color: #d5e5f2;
- border: none;
+ background-color: var(--color-bg-tertiary);
+ border: 1px solid var(--color-border-secondary);
cursor: pointer;
- height: 32px;
+ height: 28px;
outline: none;
- padding: 4px;
- margin: 4px;
- font-size: 14px;
- color: #0e69a1;
- font-family: "Open Sans", sans-serif;
+ padding: 2px;
+ margin: 3px;
+ font-size: var(--text-xs);
+ color: var(--color-text-secondary);
+ font-family: var(--font-sans);
white-space: nowrap;
align-items: center;
- border-radius: 8px;
+ border-radius: var(--radius-md);
vertical-align: middle;
text-decoration: none;
justify-content: center;
+ transition: background var(--transition-fast), border-color var(--transition-fast);
+
+ &:hover {
+ background-color: var(--color-interactive-hover);
+ border-color: var(--color-border-primary);
+ }
}
.content {
@@ -39,20 +45,18 @@
.chip {
svg {
- color: #999999;
+ color: var(--color-text-tertiary);
cursor: pointer;
- height: auto;
- margin: 20px 6px 0 -8px;
+ margin: 0 4px 0 -4px;
fill: currentColor;
- width: 1em;
- height: 1em;
+ width: 14px;
+ height: 14px;
display: inline-block;
- font-size: 16px;
- transition: fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
+ transition: color var(--transition-fast);
user-select: none;
flex-shrink: 0;
}
svg:hover {
- color: red;
+ color: var(--color-accent-red);
}
}
diff --git a/src/components/ChromeDatePicker/ChromeDatePicker.react.js b/src/components/ChromeDatePicker/ChromeDatePicker.react.js
index 83b15aa4db..c473bd9b80 100644
--- a/src/components/ChromeDatePicker/ChromeDatePicker.react.js
+++ b/src/components/ChromeDatePicker/ChromeDatePicker.react.js
@@ -74,7 +74,7 @@ export default class ChromeDatePicker extends React.Component {
{`${monthDayStringUTC(this.props.value)}`}
-
+
@@ -83,7 +83,7 @@ export default class ChromeDatePicker extends React.Component {
content = (
{`${monthDayStringUTC(this.props.value)}`}
-
+
);
}
diff --git a/src/components/ChromeDatePicker/ChromeDatePicker.scss b/src/components/ChromeDatePicker/ChromeDatePicker.scss
index 284561f397..b41aeaa290 100644
--- a/src/components/ChromeDatePicker/ChromeDatePicker.scss
+++ b/src/components/ChromeDatePicker/ChromeDatePicker.scss
@@ -19,12 +19,13 @@ $pickerHeight: 30px;
display: inline-block;
white-space: nowrap;
cursor: pointer;
- font-size: 14px;
+ font-size: var(--text-base);
height: $pickerHeight;
- border: 1px solid $blue;
- border-radius: 5px;
- padding: 6px 12px;
- color: $blue;
+ border: 1px solid var(--color-accent-blue);
+ border-radius: var(--radius-md);
+ padding: var(--space-2) var(--space-3);
+ color: var(--color-accent-blue);
+ transition: background-color var(--transition-fast), color var(--transition-fast);
span {
display: inline-block;
@@ -33,28 +34,33 @@ $pickerHeight: 30px;
svg {
vertical-align: top;
- margin-left: 10px;
+ margin-left: var(--space-2);
+ }
+
+ &:hover {
+ background: var(--color-accent-blue-light);
}
}
.open .chrome {
position: relative;
- background: white;
+ background: var(--color-bg-elevated);
border-top: none;
padding-top: 7px;
- border-radius: 0 0 5px 5px;
+ border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.calendar {
position: absolute;
- background: white;
- border: 1px solid $blue;
+ background: var(--color-bg-elevated);
+ border: 1px solid var(--color-accent-blue);
+ box-shadow: var(--shadow-overlay);
bottom: 29px;
left: 0;
width: 204px;
height: 192px;
- padding: 10px;
- border-radius: 5px 5px 5px 0;
+ padding: var(--space-2);
+ border-radius: var(--radius-md) var(--radius-md) var(--radius-md) 0;
}
.right {
@@ -66,6 +72,6 @@ $pickerHeight: 30px;
.calendar {
left: auto;
right: 0;
- border-radius: 5px 5px 0 5px;
+ border-radius: var(--radius-md) var(--radius-md) 0 var(--radius-md);
}
}
diff --git a/src/components/ChromeDropdown/ChromeDropdown.scss b/src/components/ChromeDropdown/ChromeDropdown.scss
index 0e94a195bd..2ba1402edc 100644
--- a/src/components/ChromeDropdown/ChromeDropdown.scss
+++ b/src/components/ChromeDropdown/ChromeDropdown.scss
@@ -6,24 +6,33 @@
* the root directory of this source tree.
*/
@import 'stylesheets/globals.scss';
-
+
.dropdown {
display: inline-block;
vertical-align: top;
height: 30px;
text-align: left;
white-space: nowrap;
- font-size: 14px;
+ font-size: var(--text-base);
}
.current, .menu {
- background: $purple;
- border-radius: 5px;
- color: white;
+ background: var(--color-bg-elevated);
+ border: 1px solid var(--color-border-secondary);
+ border-radius: var(--radius-md);
+ color: var(--color-text-primary);
cursor: pointer;
+ transition: var(--transition-fast);
&.blue {
- background: $darkBlue;
+ background: var(--color-accent-blue);
+ border-color: var(--color-accent-blue);
+ color: var(--color-text-on-dark);
+
+ &:hover {
+ background: var(--color-accent-blue-hover);
+ border-color: var(--color-accent-blue-hover);
+ }
}
}
@@ -31,34 +40,43 @@
position: relative;
height: 30px;
line-height: 30px;
- padding: 0 30px 0 10px;
+ padding: 0 30px 0 var(--space-3);
div {
overflow-x: hidden;
text-overflow: ellipsis;
}
+ &:hover {
+ border-color: var(--color-border-focus);
+ }
+
&:after {
- @include arrow('down', 12px, 8px, rgba(255,255,255,0.3));
+ @include arrow('down', 12px, 8px, var(--color-text-tertiary));
position: absolute;
content: '';
top: 12px;
- right: 10px;
+ right: var(--space-3);
}
}
.menu {
max-height: 360px;
overflow-y: auto;
- font-size: 14px;
+ font-size: var(--text-base);
+ box-shadow: var(--shadow-md);
+ padding: var(--space-1) 0;
div {
height: 30px;
line-height: 30px;
- padding: 0 10px;
+ padding: 0 var(--space-3);
+ border-radius: var(--radius-sm);
+ margin: 0 var(--space-1);
+ transition: var(--transition-fast);
&:hover {
- background: rgba(255, 255, 255, 0.1);
+ background: var(--color-interactive-hover);
}
}
}
diff --git a/src/components/CodeSnippet/CodeSnippet.css b/src/components/CodeSnippet/CodeSnippet.css
index 780ecb0981..1e907b50f9 100644
--- a/src/components/CodeSnippet/CodeSnippet.css
+++ b/src/components/CodeSnippet/CodeSnippet.css
@@ -6,46 +6,29 @@
* the root directory of this source tree.
*/
/**
- * prism.js default theme for JavaScript, CSS and HTML
- * Based on dabblet (http://dabblet.com)
- * @author Lea Verou
+ * Code snippet theme — uses CSS custom properties for theme support
*/
code[class*="language-"],
pre[class*="language-"] {
- color: #555572;
- font-family: 'Source Code Pro', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
- font-size: 13px;
+ color: var(--color-text-primary);
+ font-family: var(--font-mono);
+ font-size: var(--text-sm);
direction: ltr;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
- line-height: 22px;
- -moz-tab-size: 4;
- -o-tab-size: 4;
+ line-height: 1.6;
tab-size: 4;
- -webkit-hyphens: none;
- -moz-hyphens: none;
- -ms-hyphens: none;
hyphens: none;
}
-pre[class*="language-"]::-moz-selection,
-pre[class*="language-"]::-moz-selection,
-code[class*="language-"]::-moz-selection,
-code[class*="language-"]::-moz-selection {
- text-shadow: none;
- background: #b3d4fc;
-}
-
-pre[class*="language-"]::selection,
pre[class*="language-"]::selection,
-code[class*="language-"]::selection,
code[class*="language-"]::selection {
text-shadow: none;
- background: #b3d4fc;
+ background: var(--color-accent-blue-light);
}
@media print {
@@ -55,37 +38,34 @@ code[class*="language-"]::selection {
}
}
-
/* Code blocks */
-
pre[class*="language-"] {
- padding: 1em;
- margin: .5em 0;
+ padding: var(--space-4);
+ margin: 0;
overflow: auto;
+ border-radius: var(--radius-md);
}
:not(pre) > code[class*="language-"],
pre[class*="language-"] {
- background: #FDFAFB;
+ background: var(--color-bg-secondary);
}
-
/* Inline code */
-
:not(pre) > code[class*="language-"] {
- padding: .1em;
- border-radius: .3em;
+ padding: 2px 6px;
+ border-radius: var(--radius-sm);
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
- color: #a3a3c2;
+ color: var(--color-text-tertiary);
}
.token.punctuation {
- color: #555572;
+ color: var(--color-text-secondary);
}
.namespace {
@@ -99,7 +79,7 @@ pre[class*="language-"] {
.token.constant,
.token.symbol,
.token.deleted {
- color: #FF395E;
+ color: var(--color-accent-red);
}
.token.selector,
@@ -108,7 +88,7 @@ pre[class*="language-"] {
.token.char,
.token.builtin,
.token.inserted {
- color: #00D275;
+ color: var(--color-accent-green);
}
.token.operator,
@@ -116,28 +96,28 @@ pre[class*="language-"] {
.token.url,
.language-css .token.string,
.style .token.string {
- color: #555572;
+ color: var(--color-text-secondary);
}
.token.atrule,
.token.attr-value,
.token.keyword {
- color: #169CEE;
+ color: var(--color-accent-blue);
}
.token.function {
- color: #FF395E;
+ color: var(--color-accent-red);
}
.token.regex,
.token.important,
.token.variable {
- color: #F45530;
+ color: var(--color-accent-orange);
}
.token.important,
.token.bold {
- font-weight: bold;
+ font-weight: var(--font-weight-semibold);
}
.token.italic {
@@ -153,13 +133,13 @@ pre.line-numbers {
padding-left: 3.5em;
counter-reset: linenumber;
padding-top: 0px;
- padding-bottom: 20px;
+ padding-bottom: var(--space-5);
}
pre.line-numbers:before {
display: block;
content: '';
- background: #66637A;
+ background: var(--color-bg-tertiary);
height: 100%;
width: 33px;
position: absolute;
@@ -178,12 +158,8 @@ pre.line-numbers > code {
font-size: 100%;
left: -3.8em;
width: 3em;
- /* works for line-numbers below 1000 lines */
padding-top: 10px;
margin-bottom: 100px;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
user-select: none;
}
@@ -195,10 +171,10 @@ pre.line-numbers > code {
.line-numbers-rows > span:before {
content: counter(linenumber);
- color: #343445;
+ color: var(--color-text-tertiary);
display: block;
- font-size: 10px;
- font-family: 'Dosis';
+ font-size: var(--text-xs);
+ font-family: var(--font-mono);
padding-right: 0;
text-align: center;
}
diff --git a/src/components/ColumnsConfiguration/ColumnConfigurationItem.react.js b/src/components/ColumnsConfiguration/ColumnConfigurationItem.react.js
index d4b0f5d70a..8a0c1cea2d 100644
--- a/src/components/ColumnsConfiguration/ColumnConfigurationItem.react.js
+++ b/src/components/ColumnsConfiguration/ColumnConfigurationItem.react.js
@@ -29,7 +29,7 @@ export default ({ name, handleColumnDragDrop, index, onChangeVisible, visible })
style={{
opacity: isDragging ? 0.5 : 1,
cursor: isDragging ? 'grabbing' : null,
- backgroundColor: isOver && canDrop ? '#208aec' : null,
+ backgroundColor: isOver && canDrop ? 'var(--color-accent-blue-light)' : null,
}}
onClick={() => onChangeVisible(!visible)}
>
@@ -38,14 +38,14 @@ export default ({ name, handleColumnDragDrop, index, onChangeVisible, visible })
name={visible ? 'visibility' : 'visibility_off'}
width={18}
height={18}
- fill={visible ? 'white' : 'rgba(0,0,0,0.4)'}
+ fill={visible ? 'var(--color-accent-blue)' : 'var(--color-text-tertiary)'}
/>