MyCrypto/common/sass/mixins.scss
William O'Beirne bf6a122e38 Night Mode Theme (#1896)
* Initial changes to define theme maps, color function, and convert all global styles.

* More global styles.

* All styles converted, colors uncertain.

* Fix tabs, temporary theme toggle button.

* Color refinements

* Color network selector, introduce shade function

* Make palette page

* Add theme button and minor styling to nav

* Blueify dark theme

* A bunch of color adjustments to work better with dark theme

* Fix tables

* Fix wallet decrypt colors

* More misc fixes

* Fix up electron colors

* Convert web theme to redux state / action

* Theme toggle in app, prevent rerenders

* Get rid of all variables, fix selects

* Fix conf modal, modal close styles

* Fix test

* Adjust swap colors

* Check in breaking out component, changing icons

* Check in progress

* Theme toggle in footer. New icons

* Prevent rerender on theme change

* Fix up outstanding merge conflicts

* Fix generate colors to be dark mode friendly

* Reduce swap color intensity

* Make disabled buttons darker in dark mode

* Reduce button size by 25%
2018-06-26 23:51:42 -05:00

120 lines
2.3 KiB
SCSS

@import './variables';
@import '~bootstrap-sass/assets/stylesheets/bootstrap/mixins';
@mixin reset-button {
margin: 0;
padding: 0;
background: none;
border: none;
cursor: pointer;
}
@mixin clearfix {
&:after {
content: '';
display: table;
clear: both;
}
}
@mixin mono {
font-family: $font-family-monospace;
font-weight: normal;
letter-spacing: 0.02em;
}
@mixin ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
// Alpha agreement, noscript, bad browser, etc.
@mixin cover-message {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
overflow: auto;
background: color(brand-info);
z-index: $zindex-top;
&-content {
max-width: 580px;
padding: 20px;
margin: 0 auto;
color: color(text-color-inverted);
text-shadow: 1px 1px 1px rgba(#000, 0.12);
overflow: auto;
h2 {
font-size: 40px;
margin-bottom: 20px;
}
p {
font-size: 20px;
margin-bottom: 15px;
a {
color: color(text-color-inverted);
text-decoration: underline;
}
}
}
}
@mixin triangle($size, $color, $direction) {
height: 0;
width: 0;
border-color: transparent;
border-style: solid;
border-width: $size / 2;
@if $direction == up {
border-bottom-color: $color;
} @else if $direction == right {
border-left-color: $color;
} @else if $direction == down {
border-top-color: $color;
} @else if $direction == left {
border-right-color: $color;
}
}
@mixin show-tooltip-on-hover {
&:hover .Tooltip {
opacity: 1;
visibility: visible;
transform: translate(-50%, -100%) translateY(-$tooltip-hover-distance);
transition-delay: 400ms, 400ms, 300ms;
&.is-direction-left {
transform: translate(-100%, -50%) translateX(-$tooltip-hover-distance);
}
&.is-direction-right {
transform: translate(100%, -50%) translateX($tooltip-hover-distance);
}
&.is-direction-bottom {
transform: translate(-50%, 100%) translateY($tooltip-hover-distance);
}
}
}
@mixin input-shadow($color) {
box-shadow: inset 0 1px 1px rgba(black, 0.075), 0 0 1px rgba($color, 0.5);
}
@mixin input-focus-shadow($color) {
box-shadow: inset 0 1px 2px rgba(black, 0.125), 0 0 1px rgba($color, 0.5);
}
@mixin theme($name) {
.theme--#{$name} & {
@content;
}
}