From 49fe071b65eb45fb3d4deb215cfaadc4ad6b34c0 Mon Sep 17 00:00:00 2001 From: Camila Belo Date: Fri, 20 May 2022 15:39:12 +0200 Subject: [PATCH] feat(techdocs): extract animations rules Signed-off-by: Camila Belo --- .../transformers/styles/rules/animations.ts | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 plugins/techdocs/src/reader/transformers/styles/rules/animations.ts diff --git a/plugins/techdocs/src/reader/transformers/styles/rules/animations.ts b/plugins/techdocs/src/reader/transformers/styles/rules/animations.ts new file mode 100644 index 0000000000..0c50fb0633 --- /dev/null +++ b/plugins/techdocs/src/reader/transformers/styles/rules/animations.ts @@ -0,0 +1,26 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export default () => ` +/*================== Animations ==================*/ +/* + Disable CSS animations on link colors as they lead to issues in dark mode. + The dark mode color theme is applied later and theirfore there is always an animation from light to dark mode when navigation between pages. +*/ +.md-dialog, .md-nav__link, .md-footer__link, .md-typeset a, .md-typeset a::before, .md-typeset .headerlink { + transition: none; +} +`;