From 71a7cd568c61247f095d0eb11f546f69b90458b8 Mon Sep 17 00:00:00 2001 From: Arthur Taylor Date: Fri, 11 Oct 2024 12:28:17 +0200 Subject: [PATCH] Use Codex tokens and custom spacing variables (#762) Migrate away from Wikit tokens to Codex SASS variables where they are available. In some cases we use custom CSS variables for values from Wikit whose Codex equivalents are missing. Bug: T369510 Bug: T369508 Bug: T369509 --- src/components/AnonymousEditWarning.vue | 4 +++- src/components/LanguageInput.vue | 4 ++-- src/components/LemmaInput.vue | 8 -------- src/components/LexicalCategoryInput.vue | 4 ++-- src/components/NewLexemeForm.vue | 23 ++++++++++++----------- src/components/RequiredAsterisk.vue | 14 ++++---------- src/components/SearchExisting.vue | 16 +++++++++++----- src/components/SpellingVariantInput.vue | 9 +++++++-- src/styles/custom-variables.css | 8 ++++++++ 9 files changed, 49 insertions(+), 41 deletions(-) create mode 100644 src/styles/custom-variables.css diff --git a/src/components/AnonymousEditWarning.vue b/src/components/AnonymousEditWarning.vue index ec7ac614..4d998e9c 100644 --- a/src/components/AnonymousEditWarning.vue +++ b/src/components/AnonymousEditWarning.vue @@ -33,7 +33,9 @@ const warning = computed( diff --git a/src/components/LanguageInput.vue b/src/components/LanguageInput.vue index bab445d3..d632bde5 100644 --- a/src/components/LanguageInput.vue +++ b/src/components/LanguageInput.vue @@ -79,11 +79,11 @@ export default { diff --git a/src/components/LexicalCategoryInput.vue b/src/components/LexicalCategoryInput.vue index 54427801..b93ead0b 100644 --- a/src/components/LexicalCategoryInput.vue +++ b/src/components/LexicalCategoryInput.vue @@ -73,10 +73,10 @@ export default { diff --git a/src/components/SearchExisting.vue b/src/components/SearchExisting.vue index 3bd87532..b421e5bf 100644 --- a/src/components/SearchExisting.vue +++ b/src/components/SearchExisting.vue @@ -24,13 +24,19 @@ const searchMessage = computed( () => messages.get( diff --git a/src/components/SpellingVariantInput.vue b/src/components/SpellingVariantInput.vue index 901dae2f..d5b8bbf6 100644 --- a/src/components/SpellingVariantInput.vue +++ b/src/components/SpellingVariantInput.vue @@ -127,13 +127,18 @@ export default { diff --git a/src/styles/custom-variables.css b/src/styles/custom-variables.css new file mode 100644 index 00000000..17aadaa6 --- /dev/null +++ b/src/styles/custom-variables.css @@ -0,0 +1,8 @@ +* { + /* layout */ + --dimension-layout-xsmall: 1rem; + --dimension-layout-small: 1.5rem; + + /* spacing */ + --dimension-spacing-xsmall: 0.25rem; +}