You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

38 lines
1.1 KiB

// Copyright (c) 2018 Tildes contributors <code@tildes.net>
// SPDX-License-Identifier: AGPL-3.0-or-later
// stylelint-disable no-invalid-position-declaration
// shrinks a font size by 0.1rem on mobile screen sizes
@mixin font-shrink-on-mobile($base-size) {
font-size: $base-size - 0.1rem;
@media (min-width: $size-md) {
font-size: $base-size;
}
}
// makes sure the element is the "minimum touch size" on mobile
@mixin min-touch-size() {
min-width: $min-touch-size;
min-height: $min-touch-size;
@media (min-width: $size-md) {
min-width: 0;
min-height: 0;
}
}
// Forcibly wrap text in the element if it can't be done "naturally", necessary for
// handling long "words" in places like titles that might otherwise mess up the layout
@mixin force-text-wrap-if-needed() {
overflow-wrap: anywhere;
@supports not (overflow-wrap: anywhere) {
// Only Firefox supports overflow-wrap: anywhere so far, these two rules should be
// fairly similar for other browsers
overflow-wrap: break-word;
// stylelint-disable-next-line declaration-property-value-keyword-no-deprecated
word-break: break-word;
}
}