Split css (#1959)
Divides the css into sub-files and normalizes how colors are defined. Co-authored-by: Joachim <joachim.robert@protonmail.com>
This commit is contained in:
7
bookwyrm/static/css/bookwyrm/components/_avatar.css
Normal file
7
bookwyrm/static/css/bookwyrm/components/_avatar.css
Normal file
@@ -0,0 +1,7 @@
|
||||
/** Avatars
|
||||
******************************************************************************/
|
||||
|
||||
.avatar {
|
||||
vertical-align: middle;
|
||||
display: inline;
|
||||
}
|
||||
70
bookwyrm/static/css/bookwyrm/components/_book_cover.scss
Normal file
70
bookwyrm/static/css/bookwyrm/components/_book_cover.scss
Normal file
@@ -0,0 +1,70 @@
|
||||
/** Book covers
|
||||
*
|
||||
* - .is-cover gives the behaviour of the cover and its surrounding. (optional)
|
||||
* - .cover-container gives the dimensions and position (for borders, image and other elements).
|
||||
* - .book-cover is positioned and sized based on its container.
|
||||
*
|
||||
* To have the cover within specific dimensions, specify a width or height for
|
||||
* standard bulma’s named breapoints:
|
||||
*
|
||||
* `is-(w|h)-(auto|xs|s|m|l|xl|xxl)[-(mobile|tablet|desktop)]`
|
||||
*
|
||||
* The cover will be centered horizontally and vertically within those dimensions.
|
||||
*
|
||||
* When using `.column.is-N`, add `.is-w-auto` to the container so that the flex
|
||||
* calculations are not biased by the default `max-content`.
|
||||
******************************************************************************/
|
||||
|
||||
.column.is-cover {
|
||||
flex-grow: 0 !important;
|
||||
}
|
||||
|
||||
.column.is-cover,
|
||||
.column.is-cover + .column {
|
||||
flex-basis: auto !important;
|
||||
}
|
||||
|
||||
.cover-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
width: max-content;
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Book cover
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
.book-cover {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
|
||||
/* Useful when stretching under-sized images. */
|
||||
image-rendering: optimizequality;
|
||||
image-rendering: smooth;
|
||||
}
|
||||
|
||||
/* Cover caption
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
.no-cover .cover-caption {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
padding: 0.5em;
|
||||
font-size: 0.75em;
|
||||
color: white;
|
||||
background-color: $no-cover-color;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
gap: 1em;
|
||||
white-space: initial;
|
||||
text-align: center;
|
||||
}
|
||||
36
bookwyrm/static/css/bookwyrm/components/_book_grid.scss
Normal file
36
bookwyrm/static/css/bookwyrm/components/_book_grid.scss
Normal file
@@ -0,0 +1,36 @@
|
||||
/* Books grid
|
||||
******************************************************************************/
|
||||
|
||||
.books-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 1rem;
|
||||
align-items: end;
|
||||
justify-items: stretch;
|
||||
}
|
||||
|
||||
.books-grid > .is-big {
|
||||
grid-column: span 2;
|
||||
grid-row: span 2;
|
||||
justify-self: stretch;
|
||||
}
|
||||
|
||||
.books-grid .book-cover {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.books-grid .book-title {
|
||||
--height-basis: 1.35rem;
|
||||
|
||||
display: block;
|
||||
margin-top: 0.5rem;
|
||||
line-height: var(--height-basis);
|
||||
min-height: calc(2 * var(--height-basis));
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 769px) {
|
||||
.books-grid {
|
||||
gap: 1.5rem;
|
||||
grid-template-columns: repeat(auto-fill, minmax(8em, 1fr));
|
||||
}
|
||||
}
|
||||
47
bookwyrm/static/css/bookwyrm/components/_book_list.scss
Normal file
47
bookwyrm/static/css/bookwyrm/components/_book_list.scss
Normal file
@@ -0,0 +1,47 @@
|
||||
/* Book list
|
||||
******************************************************************************/
|
||||
|
||||
ol.ordered-list {
|
||||
list-style: none;
|
||||
counter-reset: list-counter;
|
||||
}
|
||||
|
||||
ol.ordered-list li {
|
||||
counter-increment: list-counter;
|
||||
}
|
||||
|
||||
ol.ordered-list li::before {
|
||||
content: counter(list-counter);
|
||||
position: absolute;
|
||||
left: -20px;
|
||||
width: 20px;
|
||||
height: 24px;
|
||||
background-color: $scheme-main;
|
||||
border: 1px solid $border;
|
||||
border-right: 0;
|
||||
border-top-left-radius: 2px;
|
||||
border-top-right-radius: 2px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: $text-light;
|
||||
font-size: 0.8em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
ol.ordered-list li::before {
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
border: 0;
|
||||
border-right: 1px solid $border;
|
||||
border-bottom: 1px solid $border;
|
||||
border-radius: 0;
|
||||
border-bottom-right-radius: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.overflow-wrap-anywhere {
|
||||
overflow-wrap: anywhere;
|
||||
min-width: 10em;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
/* Book preview table
|
||||
******************************************************************************/
|
||||
|
||||
.book-preview td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
table.is-mobile,
|
||||
table.is-mobile tbody {
|
||||
display: block;
|
||||
}
|
||||
|
||||
table.is-mobile tr {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
border-top: 1px solid $border;
|
||||
}
|
||||
|
||||
table.is-mobile td {
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
flex: 1 0 100%;
|
||||
order: 2;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
table.is-mobile td.book-preview-top-row {
|
||||
order: 1;
|
||||
flex-basis: auto;
|
||||
}
|
||||
|
||||
table.is-mobile td[data-title]:not(:empty)::before {
|
||||
content: attr(data-title);
|
||||
display: block;
|
||||
font-size: 0.75em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
table.is-mobile td:empty {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
table.is-mobile th,
|
||||
table.is-mobile thead {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
13
bookwyrm/static/css/bookwyrm/components/_breadcrumbs.scss
Normal file
13
bookwyrm/static/css/bookwyrm/components/_breadcrumbs.scss
Normal file
@@ -0,0 +1,13 @@
|
||||
/* Breadcrumbs
|
||||
******************************************************************************/
|
||||
|
||||
.breadcrumb li:first-child * {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.breadcrumb li > * {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 0 0.75em;
|
||||
}
|
||||
30
bookwyrm/static/css/bookwyrm/components/_copy.scss
Normal file
30
bookwyrm/static/css/bookwyrm/components/_copy.scss
Normal file
@@ -0,0 +1,30 @@
|
||||
/* Copy
|
||||
******************************************************************************/
|
||||
|
||||
.horizontal-copy {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.horizontal-copy textarea {
|
||||
min-width: initial;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.horizontal-copy button {
|
||||
align-self: stretch;
|
||||
height: unset;
|
||||
}
|
||||
|
||||
.vertical-copy {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.vertical-copy button {
|
||||
width: 100%;
|
||||
}
|
||||
116
bookwyrm/static/css/bookwyrm/components/_details.scss
Normal file
116
bookwyrm/static/css/bookwyrm/components/_details.scss
Normal file
@@ -0,0 +1,116 @@
|
||||
/** General `details` element styles
|
||||
******************************************************************************/
|
||||
|
||||
details summary {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
summary::-webkit-details-marker {
|
||||
display: none;
|
||||
}
|
||||
|
||||
details summary::marker {
|
||||
content: none;
|
||||
}
|
||||
|
||||
details.detail-pinned-button summary {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
details.detail-pinned-button form {
|
||||
float: left;
|
||||
width: 100%;
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
/** Dropdown w/ Details element
|
||||
******************************************************************************/
|
||||
|
||||
details.dropdown[open] summary.dropdown-trigger::before {
|
||||
content: "";
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
details.dropdown .dropdown-menu {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
details.dropdown .dropdown-menu button {
|
||||
/* Fix weird Safari defaults */
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
details.dropdown .dropdown-menu button:focus-visible,
|
||||
details.dropdown .dropdown-menu a:focus-visible {
|
||||
outline-style: auto;
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 768px) {
|
||||
details.dropdown[open] summary.dropdown-trigger::before {
|
||||
background-color: rgba($scheme-invert, 0.5);
|
||||
z-index: 30;
|
||||
}
|
||||
|
||||
details .dropdown-menu {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex !important;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
pointer-events: none;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
details .dropdown-menu > * {
|
||||
pointer-events: all;
|
||||
}
|
||||
}
|
||||
|
||||
/** Details panel
|
||||
******************************************************************************/
|
||||
|
||||
details.details-panel {
|
||||
box-shadow: 0 0 0 1px $border;
|
||||
transition: box-shadow 0.2s ease;
|
||||
padding: 0.75rem;
|
||||
}
|
||||
|
||||
details[open].details-panel,
|
||||
details.details-panel:hover {
|
||||
box-shadow: 0 0 0 1px $border;
|
||||
}
|
||||
|
||||
details.details-panel summary {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
details summary .details-close {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
transform: rotate(45deg);
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
details[open] summary .details-close {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 769px) {
|
||||
.details-panel .filters-field:not(:last-child) {
|
||||
border-right: 1px solid $border;
|
||||
margin-top: 0.75rem;
|
||||
margin-bottom: 0.75rem;
|
||||
padding-top: 0.25rem;
|
||||
padding-bottom: 0.25rem;
|
||||
}
|
||||
}
|
||||
28
bookwyrm/static/css/bookwyrm/components/_file_input.scss
Normal file
28
bookwyrm/static/css/bookwyrm/components/_file_input.scss
Normal file
@@ -0,0 +1,28 @@
|
||||
/** File input styles
|
||||
******************************************************************************/
|
||||
|
||||
input[type="file"]::file-selector-button {
|
||||
-moz-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
background-color: $scheme-main;
|
||||
border-radius: 4px;
|
||||
border: 1px solid $border;
|
||||
box-shadow: none;
|
||||
color: $text;
|
||||
cursor: pointer;
|
||||
font-size: 1rem;
|
||||
height: 2.5em;
|
||||
justify-content: center;
|
||||
line-height: 1.5;
|
||||
padding-bottom: calc(0.5em - 1px);
|
||||
padding-left: 1em;
|
||||
padding-right: 1em;
|
||||
padding-top: calc(0.5em - 1px);
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
input[type="file"]::file-selector-button:hover {
|
||||
border-color: $border-hover;
|
||||
color: text;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
/** Transient notification
|
||||
******************************************************************************/
|
||||
|
||||
#live-messages {
|
||||
position: fixed;
|
||||
bottom: 1em;
|
||||
right: 1em;
|
||||
}
|
||||
10
bookwyrm/static/css/bookwyrm/components/_shelving.scss
Normal file
10
bookwyrm/static/css/bookwyrm/components/_shelving.scss
Normal file
@@ -0,0 +1,10 @@
|
||||
/** Shelving
|
||||
******************************************************************************/
|
||||
|
||||
/** @todo Replace icons with SVG symbols.
|
||||
@see https://www.youtube.com/watch?v=9xXBYcWgCHA */
|
||||
.shelf-option:disabled > *::after {
|
||||
font-family: icomoon; /* stylelint-disable font-family-no-missing-generic-family-keyword */
|
||||
content: "\e919"; /* icon-check */
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
52
bookwyrm/static/css/bookwyrm/components/_stars.scss
Normal file
52
bookwyrm/static/css/bookwyrm/components/_stars.scss
Normal file
@@ -0,0 +1,52 @@
|
||||
/** Stars
|
||||
******************************************************************************/
|
||||
|
||||
.stars {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/** Stars in a review form
|
||||
*
|
||||
* Specificity makes hovering taking over checked inputs.
|
||||
*
|
||||
* \e9d9: filled star
|
||||
* \e9d7: empty star;
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
.form-rate-stars {
|
||||
width: max-content;
|
||||
}
|
||||
|
||||
/* All stars are visually filled by default. */
|
||||
.form-rate-stars .icon::before {
|
||||
content: "\e9d9"; /* icon-star-full */
|
||||
}
|
||||
|
||||
/* Icons directly following half star inputs are marked as half */
|
||||
.form-rate-stars input.half:checked ~ .icon::before {
|
||||
content: "\e9d8"; /* icon-star-half */
|
||||
}
|
||||
|
||||
/* stylelint-disable no-descending-specificity */
|
||||
.form-rate-stars input.half:checked + input + .icon:hover::before {
|
||||
content: "\e9d8" !important; /* icon-star-half */
|
||||
}
|
||||
|
||||
/* Icons directly following half check inputs that follow the checked input are emptied. */
|
||||
.form-rate-stars input.half:checked + input + .icon ~ .icon::before {
|
||||
content: "\e9d7"; /* icon-star-empty */
|
||||
}
|
||||
|
||||
/* Icons directly following inputs that follow the checked input are emptied. */
|
||||
.form-rate-stars input:checked ~ input + .icon::before {
|
||||
content: "\e9d7"; /* icon-star-empty */
|
||||
}
|
||||
|
||||
/* When a label is hovered, repeat the fill-all-then-empty-following pattern. */
|
||||
.form-rate-stars:hover .icon.icon::before {
|
||||
content: "\e9d9" !important; /* icon-star-full */
|
||||
}
|
||||
|
||||
.form-rate-stars .icon:hover ~ .icon::before {
|
||||
content: "\e9d7" !important; /* icon-star-empty */
|
||||
}
|
||||
57
bookwyrm/static/css/bookwyrm/components/_status.scss
Normal file
57
bookwyrm/static/css/bookwyrm/components/_status.scss
Normal file
@@ -0,0 +1,57 @@
|
||||
/** Statuses: Quotes
|
||||
*
|
||||
* \e906: icon-quote-open
|
||||
* \e905: icon-quote-close
|
||||
*
|
||||
* The `content` class on the blockquote allows to apply styles to markdown
|
||||
* generated HTML in the quote: https://bulma.io/documentation/elements/content/
|
||||
*
|
||||
* ```html
|
||||
* <div class="quote block">
|
||||
* <blockquote dir="auto" class="content mb-2">
|
||||
* User generated quote in markdown…
|
||||
* </blockquote>
|
||||
*
|
||||
* <p> — <a…>Book Title</a> by <a…class="author">Author</a></p>
|
||||
* </div>
|
||||
* ```
|
||||
******************************************************************************/
|
||||
|
||||
.quote > blockquote {
|
||||
position: relative;
|
||||
padding-left: 2em;
|
||||
}
|
||||
|
||||
.quote > blockquote::before,
|
||||
.quote > blockquote::after {
|
||||
font-family: icomoon; /* stylelint-disable font-family-no-missing-generic-family-keyword */
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.quote > blockquote::before {
|
||||
content: "\e907"; /* icon-quote-open */
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.quote > blockquote::after {
|
||||
content: "\e906"; /* icon-quote-close */
|
||||
right: 0;
|
||||
}
|
||||
|
||||
/* Threads
|
||||
******************************************************************************/
|
||||
|
||||
.thread .is-main .card {
|
||||
box-shadow: 0 0.5em 1em -0.125em rgba($link, 0.35), 0 0 0 1px rgba($link, 0.02);
|
||||
}
|
||||
|
||||
.thread::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 2.5em;
|
||||
border-left: 2px solid $border;
|
||||
}
|
||||
176
bookwyrm/static/css/bookwyrm/components/_tabs.scss
Normal file
176
bookwyrm/static/css/bookwyrm/components/_tabs.scss
Normal file
@@ -0,0 +1,176 @@
|
||||
/** Bookwyrm Tabs
|
||||
******************************************************************************/
|
||||
|
||||
.bw-tabs {
|
||||
-webkit-overflow-scrolling: touch;
|
||||
-webkit-touch-callout: none;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
font-size: 1rem;
|
||||
justify-content: flex-start;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
user-select: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.bw-tabs::before {
|
||||
border-bottom-color: $border;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-width: 1px;
|
||||
bottom: 0;
|
||||
content: "";
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.bw-tabs:not(:last-child) {
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.bw-tabs a {
|
||||
align-items: center;
|
||||
border-bottom-color: $border;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-width: 1px;
|
||||
color: $text;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-bottom: -1px;
|
||||
padding: 0.5em 1em;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.bw-tabs a:hover {
|
||||
border-bottom-color: transparent;
|
||||
color: $text;
|
||||
}
|
||||
|
||||
.bw-tabs a.is-active {
|
||||
border-bottom-color: transparent;
|
||||
color: $link;
|
||||
}
|
||||
|
||||
.bw-tabs.is-left {
|
||||
padding-right: 0.75em;
|
||||
}
|
||||
|
||||
.bw-tabs.is-center {
|
||||
flex: none;
|
||||
justify-content: center;
|
||||
padding-left: 0.75em;
|
||||
padding-right: 0.75em;
|
||||
}
|
||||
|
||||
.bw-tabs.is-right {
|
||||
justify-content: flex-end;
|
||||
padding-left: 0.75em;
|
||||
}
|
||||
|
||||
.bw-tabs .icon:first-child {
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
.bw-tabs .icon:last-child {
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
|
||||
.bw-tabs.is-centered {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.bw-tabs.is-boxed a {
|
||||
border: 1px solid transparent;
|
||||
border-radius: 4px 4px 0 0;
|
||||
}
|
||||
|
||||
.bw-tabs.is-boxed a:hover {
|
||||
background-color: $background-secondary;
|
||||
border-bottom-color: $border-hover;
|
||||
}
|
||||
|
||||
.bw-tabs.is-boxed a.is-active {
|
||||
background-color: $background-body;
|
||||
border-color: $border;
|
||||
border-bottom-color: $border !important;
|
||||
}
|
||||
|
||||
.bw-tabs.is-fullwidth a {
|
||||
flex-grow: 1;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.bw-tabs.is-toggle a {
|
||||
border-color: $border;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
margin-bottom: 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.bw-tabs.is-toggle a:hover {
|
||||
background-color: $background-secondary;
|
||||
border-color: $border;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.bw-tabs.is-toggle a + a {
|
||||
margin-left: -1px;
|
||||
}
|
||||
|
||||
.bw-tabs.is-toggle a:first-child {
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
|
||||
.bw-tabs.is-toggle a:last-child {
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
|
||||
.bw-tabs.is-toggle a.is-active {
|
||||
background-color: $link-background;
|
||||
border-color: $link;
|
||||
color: $text;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.bw-tabs.is-toggle {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.bw-tabs.is-toggle.is-toggle-rounded a:first-child {
|
||||
border-bottom-left-radius: 290486px;
|
||||
border-top-left-radius: 290486px;
|
||||
padding-left: 1.25em;
|
||||
}
|
||||
|
||||
.bw-tabs.is-toggle.is-toggle-rounded a:last-child {
|
||||
border-bottom-right-radius: 290486px;
|
||||
border-top-right-radius: 290486px;
|
||||
padding-right: 1.25em;
|
||||
}
|
||||
|
||||
.bw-tabs.is-small {
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.bw-tabs.is-medium {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
.bw-tabs.is-large {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.bw-tabs.has-aside-text a {
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
.bw-tabs a .aside-text {
|
||||
position: absolute;
|
||||
top: calc(-0.75rem - 0.75rem);
|
||||
left: 0;
|
||||
color: $text;
|
||||
}
|
||||
45
bookwyrm/static/css/bookwyrm/components/_toggle.scss
Normal file
45
bookwyrm/static/css/bookwyrm/components/_toggle.scss
Normal file
@@ -0,0 +1,45 @@
|
||||
/** Toggles
|
||||
******************************************************************************/
|
||||
|
||||
.toggle-button[aria-pressed="true"],
|
||||
.toggle-button[aria-pressed="true"]:hover {
|
||||
background-color: hsl(171deg, 100%, 41%);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.hide-active[aria-pressed="true"],
|
||||
.hide-inactive[aria-pressed="false"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.transition-x.is-hidden,
|
||||
.transition-y.is-hidden {
|
||||
display: block !important;
|
||||
visibility: hidden !important;
|
||||
height: 0 !important;
|
||||
width: 0 !important;
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.transition-x,
|
||||
.transition-y {
|
||||
transition-duration: 0.5s;
|
||||
transition-timing-function: ease;
|
||||
}
|
||||
|
||||
.transition-x {
|
||||
transition-property: width, margin-left, margin-right, padding-left, padding-right;
|
||||
}
|
||||
|
||||
.transition-y {
|
||||
transition-property: height, margin-top, margin-bottom, padding-top, padding-bottom;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.transition-x,
|
||||
.transition-y {
|
||||
transition-duration: 0.001ms !important;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user