0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00
wagtail/client/scss/settings/_variables.scss

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

114 lines
3.0 KiB
SCSS
Raw Normal View History

@use 'sass:color';
// paths
2015-11-03 13:15:33 +01:00
// We can't use absolute paths here, because those are dependent on Django's
// STATIC_URL setting. Instead, relative paths from the final location of the
// compiled CSS files are used.
// */
$images-root: '../images/';
2015-11-03 13:15:33 +01:00
// grid settings
$grid-columns: 12;
$grid-gutter-width: 3%;
$grid-max-width: 1200px;
$grid-content-indent: 0.7;
2014-02-14 12:51:27 +01:00
$mobile-nice-padding: 20px;
$desktop-nice-padding: 80px;
2014-02-14 12:51:27 +01:00
// All text inputs have a 42px set height to simplify alignment.
$text-input-height: 2.625rem;
// Forms should be constrainted to a maximum width for legibility.
$max-form-width: 840px;
2015-11-03 13:15:33 +01:00
// screen breakpoints
$breakpoints: (
xs: 0,
sm: 50em,
// 800px
md: 56.25em,
// 900px
lg: 75em,
// 1200px
xl: 100em,
// 1440px
);
2015-11-03 13:15:33 +01:00
// colours
$color-teal: theme('colors.secondary.DEFAULT');
$color-teal-darker: theme('colors.secondary.400');
$color-teal-dark: theme('colors.secondary.600');
$color-white: theme('colors.white.DEFAULT');
$color-black: theme('colors.black.DEFAULT');
2015-11-03 13:15:33 +01:00
// darker to lighter
$color-grey-1: theme('colors.grey.600');
$color-grey-2: theme('colors.grey.400');
$color-grey-3: theme('colors.grey.200');
$color-grey-4: theme('colors.grey.100');
$color-grey-5: theme('colors.grey.50');
$color-menu-text: theme('colors.white-80');
$color-text-base: theme('colors.grey.600');
$color-input-text: $color-text-base;
$color-input-bg: theme('colors.white.DEFAULT');
$color-input-border: theme('colors.grey.150');
$color-input-disabled-text: theme('colors.grey.400');
$color-input-disabled-bg: theme('colors.grey.50');
$color-input-disabled-border: theme('colors.grey.100');
$color-input-hover-border: theme('colors.grey.200');
$color-input-error-border: theme('colors.critical.200');
$color-button: $color-teal;
$color-button-hover: $color-teal-darker;
$color-button-no: theme('colors.critical.200');
$color-button-warning: theme('colors.warning.100');
$color-link: $color-teal-darker;
$color-link-hover: $color-teal-dark;
// The focus outline color is defined without reusing a named color variable
// because it shouldnt be reused for anything else in the UI.
$color-focus-outline: #ffbf47;
// System Colors
$media-forced-colours: active;
$system-color-link-text: LinkText;
$system-color-button-text: ButtonText;
2015-11-03 13:15:33 +01:00
// Fonts
Update system font stack value for compatibility. Fix #7724 (#7972) Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com> - `-apple-system, BlinkMacSystemFont` - These are used to target modern iOS Safari, macOS Safari, macOS Firefox and macOS Chrome's system fonts. - ` 'Segoe UI', system-ui,` - These fonts target windows machines on Windows 7+ [reference](https://markdotto.com/2018/02/07/github-system-fonts/#the-stack). Having system-ui placed after Segoe UI allowed Segoe UI to take precedence when used on Windows machines set to Chinese ( Simplified ) language. There are some known language issues around `system-ui` being used: [This github article](https://infinnie.github.io/blog/2017/systemui.html). However, the purpose of `system-ui` [(reference here)](https://drafts.csswg.org/css-fonts-4/#valdef-font-family-system-ui) is to allow web content to integrate with the look and feel of the native OS. Which makes this font-family a good choice for other devices _if_ the problem is solved by putting Segoe UI first. - `Roboto,` - This is our fallback font for androids devices. Having Segoe set before this allows windows to use its system default font even if you have installed Roboto for development reasons. - `Helvetica Neue,` - This is a fallback for older macOS - `Arial` - Using this to catch any of the very old Windows versions (shoutout windows 95) - `sans-serif` - Our last resort to get a font without serifs - ` 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';` - All the emoji's for the OS's mentioned above. 😁
2022-02-14 16:17:02 +01:00
// Our fonts are based off of a list of system fallbacks to ensure
// that the most 'up-to-date' and available system font is used and rendered consistently as possible across browsers.
$font-sans: theme('fontFamily.sans');
$font-mono: theme('fontFamily.mono');
// Legacy icon font, to be removed in the near future.
$font-wagtail-icons: wagtail;
2015-11-03 13:15:33 +01:00
// misc sizing
$menu-width: 200px;
Slim sidebar visual design issues (#8404) - Visual design – Collapsed sidebar is wider than intended - Visual design – Change “Edit your account” to “Account” tooltip - Visual design – Slim side bar on bird hover, make the bird a little big bigger (don’t make it shrink as much) - Visual design – Change the tooltip to the darker indigo (discussed with ben and this is no longer necessary) - Visual design – Expand the space between the menu items (add 3px padding) - then adjust the flyout menu items spacing too - Visual design – Get the labels and icons to align vertically (space between icon and label) - Visual design – Make the width 60px - Visual design – Make the arrows slightly smaller and closer to the icons on slim view - Visual design – Move the bird higher up and slightly smaller, as per the designs - Animations – I wonder if the new |-> icon should flip horizontally rather than roll? (or maybe not animate at all?) The rolling animation feels a little strange as I think the pipe is meant to represent the always vertical menu - Animations – The Bird seems to have two hover states (try slowly moving your mouse cursor from top to bottom and you'll see it's wing appears before the hover animation is triggered). Not sure if this is intended behaviour. - UX – Unexpected behavior with the search – clicking the "Search" icon submits a search, while all other icons in the sidebar are safe to click (This will expand the menu in slim mode and only have pointer events to submit in expanded mode which should be acceptable as its the submit button for the field?) Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-04-23 01:10:32 +02:00
$menu-width-slim: 60px;
$side-panel-width: 500px;
2021-06-23 22:50:33 +02:00
$mobile-nav-indent: 50px;
$sidebar-toggle-spacing: 12px;
$sidebar-toggle-size: 35px;
// Comments
$comment-button-size: theme('spacing.5');
$comment-button-space: theme('spacing.3');
2021-06-23 22:50:33 +02:00
// transitions
// Please keep in sync with SIDEBAR_TRANSITION_DURATION variable in `client/src/components/Sidebar/Sidebar.tsx`
$menu-transition-duration: 150ms;
$focus-outline-width: 3px;
$object-title-height: 40px;