Browse Source

Use * selector for applying theme border colors

This is a lot simpler, and works for almost everything.
merge-requests/85/head
Deimos 5 years ago
parent
commit
50689d11b0
  1. 1
      tildes/scss/modules/_comment.scss
  2. 4
      tildes/scss/modules/_input.scss
  3. 70
      tildes/scss/themes/_theme_base.scss

1
tildes/scss/modules/_comment.scss

@ -12,6 +12,7 @@
.comment[data-comment-depth="0"] { .comment[data-comment-depth="0"] {
border-bottom: 1px solid; border-bottom: 1px solid;
border-color: inherit;
} }
.comment-header { .comment-header {

4
tildes/scss/modules/_input.scss

@ -1,6 +1,10 @@
// Copyright (c) 2018 Tildes contributors <code@tildes.net> // Copyright (c) 2018 Tildes contributors <code@tildes.net>
// SPDX-License-Identifier: AGPL-3.0-or-later // SPDX-License-Identifier: AGPL-3.0-or-later
.input-group .input-group-addon {
border-color: inherit;
}
.input-invite-code { .input-invite-code {
font-size: 0.6rem; font-size: 0.6rem;
margin-top: 0.4rem; margin-top: 0.4rem;

70
tildes/scss/themes/_theme_base.scss

@ -22,6 +22,10 @@
// set $is-light as a bool for whether the background seems light or dark // set $is-light as a bool for whether the background seems light or dark
$is-light: is-color-bright(map-get($theme, "background-primary")); $is-light: is-color-bright(map-get($theme, "background-primary"));
* {
border-color: map-get($theme, "border");
}
a { a {
color: map-get($theme, "link"); color: map-get($theme, "link");
@ -74,27 +78,6 @@
background-color: map-get($theme, "background-secondary"); background-color: map-get($theme, "background-secondary");
} }
fieldset {
border-color: map-get($theme, "border");
}
figure {
border-color: map-get($theme, "border");
}
h1,
h2,
h3,
h4,
h5,
h6 {
border-color: map-get($theme, "border");
}
hr {
border-color: map-get($theme, "border");
}
main { main {
background-color: map-get($theme, "background-primary"); background-color: map-get($theme, "background-primary");
} }
@ -103,11 +86,6 @@
background-color: map-get($theme, "background-secondary"); background-color: map-get($theme, "background-secondary");
} }
td,
th {
border-color: map-get($theme, "border");
}
th { th {
border-bottom-color: map-get($theme, "foreground-highlight"); border-bottom-color: map-get($theme, "foreground-highlight");
} }
@ -305,14 +283,6 @@
} }
} }
.comment {
border-color: map-get($theme, "border");
&[data-comment-depth="0"] {
border-color: map-get($theme, "border");
}
}
.comment-header { .comment-header {
color: map-get($theme, "foreground-highlight"); color: map-get($theme, "foreground-highlight");
background-color: map-get($theme, "background-secondary"); background-color: map-get($theme, "background-secondary");
@ -322,14 +292,10 @@
border-left-color: map-get($theme, "stripe-target"); border-left-color: map-get($theme, "stripe-target");
} }
.divider {
border-color: map-get($theme, "border");
&[data-content]::after {
.divider[data-content]::after {
color: map-get($theme, "foreground-primary"); color: map-get($theme, "foreground-primary");
background-color: map-get($theme, "background-primary"); background-color: map-get($theme, "background-primary");
} }
}
.empty-subtitle { .empty-subtitle {
color: map-get($theme, "foreground-secondary"); color: map-get($theme, "foreground-secondary");
@ -344,10 +310,6 @@
background-color: map-get($theme, "background-input"); background-color: map-get($theme, "background-input");
} }
.form-input:not(:focus) {
border-color: map-get($theme, "border");
}
// error colors for :invalid inputs, using same approach as Spectre // error colors for :invalid inputs, using same approach as Spectre
.form-input:not(:placeholder-shown):invalid { .form-input:not(:placeholder-shown):invalid {
border-color: map-get($theme, "error"); border-color: map-get($theme, "error");
@ -361,22 +323,13 @@
} }
} }
.form-markdown-preview {
border-color: map-get($theme, "border");
}
.form-select {
border-color: map-get($theme, "border");
&:not([multiple]):not([size]) {
.form-select:not([multiple]):not([size]) {
background-color: map-get($theme, "background-input"); background-color: map-get($theme, "background-input");
} }
}
.input-group-addon { .input-group-addon {
background-color: map-get($theme, "background-secondary"); background-color: map-get($theme, "background-secondary");
color: map-get($theme, "foreground-highlight"); color: map-get($theme, "foreground-highlight");
border-color: map-get($theme, "border");
} }
.label-topic-tag { .label-topic-tag {
@ -409,8 +362,6 @@
} }
.message { .message {
border-color: map-get($theme, "border");
header { header {
color: map-get($theme, "foreground-highlight"); color: map-get($theme, "foreground-highlight");
background-color: map-get($theme, "background-secondary"); background-color: map-get($theme, "background-secondary");
@ -463,10 +414,6 @@
background-color: map-get($theme, "alert"); background-color: map-get($theme, "alert");
} }
.tab {
border-color: map-get($theme, "border");
}
.tab .tab-item { .tab .tab-item {
a { a {
color: map-get($theme, "foreground-primary"); color: map-get($theme, "foreground-primary");
@ -506,7 +453,6 @@
.toast { .toast {
color: map-get($theme, "foreground-highlight"); color: map-get($theme, "foreground-highlight");
border-color: map-get($theme, "border");
background-color: map-get($theme, "background-secondary"); background-color: map-get($theme, "background-secondary");
} }
@ -531,10 +477,6 @@
} }
} }
.topic {
border-color: map-get($theme, "border");
}
.topic-listing { .topic-listing {
> li:nth-of-type(2n) { > li:nth-of-type(2n) {
color: color:

Loading…
Cancel
Save