Files
talk/src/core/client/ui/theme/variables.css.ts
T
Tessa Thornton 4ee8cf7c96 new admin branding (#2692)
* add comment revisions

* add strings

* update fixtures

* fix fixtures

* [CORL-629] Update admin moderation containers to use new branding tokens (#2600)

* Convert the moderation card components to use new styles

CORL-629

* Style the details area in the moderate card using new font and color styles

CORL-629

* Update FlagDetails on Moderate Card to match new branding styles

CORL-629

* Remove typography from ModerateCard Username

CORL-629

* Remove unnecessary new typography tokens created while experimenting

CORL-629

* Update background colors of username buttons on moderate card

CORL-629

* Update approve reject buttons to use new colors

CORL-629

* Fix alignment of username and "Reply to" in InReplyTo component

CORL-629

* Update moderated by on moderate card to match new branding

CORL-629

* Create distinct admin marker and counter components with new branding styles

Update moderate card components to use these distinct newly branded styles.

CORL-629

* Create independent Tabs control with new styling for admin area

Use it on the moderate card details area.

CORL-629

* Remove letter spacing from moderate card styles

CORL-629

* Update "DETAILS" tab on moderate card to be named "INFO"

CORL-629

* Update some missing v2 css variables

CORL-629

* Tweak the spacing of the COMMENT link and title on the moderate card

CORL-629

* Update details font color on moderate card

CORL-629

* Update spacing on newly styled Admin Tab component

CORL-629

* Update spacing of reply to username on the moderate card

CORL-629

* Update moderate card comment text area minimum width and height

CORL-629

* Update vertical divider on moderate card to updated branding

CORL-629

* Introduce new bold open sans font face

Downgrades all existing bold's to semi-bold as they were equivalent before.

CORL-629

* Update moderate card details tabs to use new bold open sans font

CORL-629

* Create an admin specific timestamp control that implements new branding

CORL-629

* Migrate shared moderate card styles into child component files

CORL-629

* [CORL-631] Update admin side main navigation to new branding styles (#2625)

* Convert the moderation card components to use new styles

CORL-629

* Style the details area in the moderate card using new font and color styles

CORL-629

* Update FlagDetails on Moderate Card to match new branding styles

CORL-629

* Remove typography from ModerateCard Username

CORL-629

* Remove unnecessary new typography tokens created while experimenting

CORL-629

* Update background colors of username buttons on moderate card

CORL-629

* Update approve reject buttons to use new colors

CORL-629

* Fix alignment of username and "Reply to" in InReplyTo component

CORL-629

* Update moderated by on moderate card to match new branding

CORL-629

* Create distinct admin marker and counter components with new branding styles

Update moderate card components to use these distinct newly branded styles.

CORL-629

* Create independent Tabs control with new styling for admin area

Use it on the moderate card details area.

CORL-629

* Remove letter spacing from moderate card styles

CORL-629

* Update "DETAILS" tab on moderate card to be named "INFO"

CORL-629

* Update some missing v2 css variables

CORL-629

* Tweak the spacing of the COMMENT link and title on the moderate card

CORL-629

* Update details font color on moderate card

CORL-629

* Update spacing on newly styled Admin Tab component

CORL-629

* Update spacing of reply to username on the moderate card

CORL-629

* Update moderate card comment text area minimum width and height

CORL-629

* Update vertical divider on moderate card to updated branding

CORL-629

* Introduce new bold open sans font face

Downgrades all existing bold's to semi-bold as they were equivalent before.

CORL-629

* Update moderate card details tabs to use new bold open sans font

CORL-629

* Create an admin specific timestamp control that implements new branding

CORL-629

* Migrate shared moderate card styles into child component files

CORL-629

* Update main navigation admin side to use new branding styles

CORL-631

* Bring in some preliminary color and font styles for the search bar

This helps it match navigation, but does not update all the sub-styles of
the search bar's many child components.

CORL-631

* [CORL-694] use new styles for decision history (#2644)

* use new styles for decision history

* remove reference to nonexistent variable

* update snaps

* [CORL 695] admin branding - user menu (#2650)

* update user menu, popover, and dropdown to new design tokens

* fix feature button colours

* use v2 spacing vars

* admin branding: tables (#2651)

* update user menu, popover, and dropdown to new design tokens

* fix feature button colours

* use v2 spacing vars

* style stories and users table

* update snap

* update user status font weight

* remove duplicate declaration

* fix line height references

* update design tokens for text inputs and selects (#2658)

* use box shadow instead of outline for focus states

* Update snapshots to adjust for resolved merge conflicts

* Bring new branding styles to button components (#2667)

* Create preliminary filled and outline buttons that match branding

* Add adornment button variant to newly branded button

* Add the ghost variant to the newly branded button component

* Add underlined variant to the newly branded button component

* Remove external Icon composes property

* Convert camel-case button variables to kebab-case

* [CORL-672] Configuration pages new branding (#2673)

* style config side nav

* general configuration tab branding

* organization tab branding

* moderation configuration branding

* banned/suspect words config branding

* email config branding

* advanced settings branding

* auth config branding

* move helpertext and fieldset components

* add textarea component

* add back gutters on table search

* update snaps

* fix header component to accept labels

* use new spacing form components

* use spacing components for advanced config

* fix tests

* fix line height of radio buttons

* update validation message branding

* update snaps

* fix paths casing

* try lowercase then

* add docs for new form components

* move description component

* update snaps

* move components to /ui/v2

* [CORL-673] Update the moderate area search menu to use new branding styles (#2672)

* Create preliminary filled and outline buttons that match branding

* Add adornment button variant to newly branded button

* Add the ghost variant to the newly branded button component

* Add underlined variant to the newly branded button component

* Remove external Icon composes property

* Convert camel-case button variables to kebab-case

* Preliminarily migrate raw components into v2 to prep for branding updates

CORL-673

* Preliminarily update the search results bar to use new branding tokens

CORL-673

* Update styles to new branding on migrated v2 client-ui components

CORL-673

* Update see all and moderate all search option icons

CORL-673

* style config side nav

* general configuration tab branding

* organization tab branding

* moderation configuration branding

* banned/suspect words config branding

* email config branding

* advanced settings branding

* auth config branding

* move helpertext and fieldset components

* add textarea component

* add back gutters on table search

* update snaps

* fix header component to accept labels

* use new spacing form components

* use spacing components for advanced config

* fix tests

* fix line height of radio buttons

* update validation message branding

* update snaps

* fix paths casing

* try lowercase then

* add docs for new form components

* move description component

* update snaps

* move components to /ui/v2

* Set size="md" on the Icon component and not the Localized component

CORL-673

* tag component

* [CORL-669] user drawer + misc branding (#2686)

* tag component

* top of user drawer branding

* recent history in drawer

* add tooltips component

* use correct spacing prop

* history tabs

* user history and rejected comments

* move callout component'

* moderator notes components

* account history table

* table user row

* swap in tabs components

* remove overflow:hidden on buttons

* update snaps

* replace overflow scroll with auto

* clean up from rebasing vs master

* fix ts

* sort exports

* fix confusing linting errors

* update snaps

* clean up nav bar design

* adjust nav hover colors

* comment content component

* update nav hover styles

* fix search bar border

* clean up moderate card components

* more user drawer cleanup

* user role switcher

* update textfield vars and variants

* update components in community page

* move clickoutside component

* clean up stories table

* moderate route components

* single moderate view

* queue components

* delay component

* relative time component

* decision history components

* user drawer components cleanup

* configure components

* clean up buttons

* update snaps

* add all exports

* [CORL-674] admin branding: modals (#2695)

* update hotkeys modal components

* hotkeys modal

* user status change modals

* user status change modals

* invite users modal

* fix tests

* fix incorrect i18n string

* resolve merge conflicts

* move fonts to devdeps

* Fix username props interface

* fix dom nesting in components

* update formatting in strings

* rewrite delay component as functional component

* remove tslint comments

* change configure header component props
2019-11-26 11:26:53 -05:00

48 lines
1.1 KiB
TypeScript

/*
Variables defined in `variables.ts` are already available
flattened and in kebab case.
These are additionally variables we define.
*/
import flat from "flat";
import { kebabCase, mapKeys, mapValues, pickBy } from "lodash";
import variables from "./variables";
import variables2 from "./variables2";
const flatKebabVariables = mapKeys(
mapValues(flat(variables, { delimiter: "-" }), v => v.toString()),
(_, k) => `--${kebabCase(k)}`
);
// These are the default css standard variables.
const cssVariables = pickBy(
flatKebabVariables,
(v, k) => !k.startsWith("breakpoints-")
);
const v2FlatKebabVariables = mapKeys(
mapValues(flat(variables2, { delimiter: "-" }), v => v.toString()),
(_, k) => `--v2-${kebabCase(k)}`
);
const cssVariablesV2 = pickBy(
v2FlatKebabVariables,
(v, k) => !k.startsWith("breakpoints-")
);
const style = {
":root": {
...Object.assign({}, cssVariables, cssVariablesV2),
"--mini-unit": "calc(1px * var(--mini-unit-small))",
},
[`@media (min-width: ${variables.breakpoints.xs}px)`]: {
":root": {
"--mini-unit": "calc(1px * var(--mini-unit-large))",
},
},
};
module.exports = style;