Files
pybricks-code/src/variables.scss
T
David Lechner d00297f53b app: drop focus-within styling
This ended up causing dual focus rings which goes against ARIA recommendations.
2022-12-16 17:54:36 -06:00

49 lines
1.3 KiB
SCSS

// SPDX-License-Identifier: MIT
// Copyright (c) 2020-2022 The Pybricks Authors
@use 'sass:color';
@use '@blueprintjs/core/lib/scss/variables' as bp;
$status-bar-height: 30px;
// point at which we change the UI for narrow screens
$narrow-screen-limit: 700px;
// Official Pybricks branding color.
$pybricks-blue: #0088ce;
// blueprint doesn't define this
$pt-dark-outline-color: rgba(bp.$blue5, 0.6);
/**
* Adjusts the background contrast by $background-adjust (usually a percent).
*
* The light theme will be made darker by that amount and the dark theme will
* be made lighter.
*/
@mixin background-contrast($background-adjust) {
background-color: color.adjust(
bp.$pt-app-background-color,
$lightness: -$background-adjust
);
.#{bp.$ns}-dark & {
background-color: color.adjust(
bp.$pt-dark-app-background-color,
$lightness: $background-adjust
);
}
}
// This is usually used with :focus-visible, but can be use with :focus if
// we wan't focust to be visible, even on mouse click.
@mixin focus-outline($offset) {
outline: bp.$pt-outline-color solid 2px;
outline-offset: $offset;
.#{bp.$ns}-dark & {
outline: bp.$pt-outline-color solid 2px;
outline-offset: $offset;
}
}