Reset theme css - #3402592
Closes #3402592
Merge request reports
Activity
added 4 commits
-
488d4ef0...bacbed4a - 2 commits from branch
project:1.x
- abee0c39 - Reset theme css - #3402592
- f939807e - Also tooltip fix
-
488d4ef0...bacbed4a - 2 commits from branch
85 85 transform: translateX(-100%); 86 86 border-inline-end: 1px solid var(--admin-toolbar-color-gray-100); 87 87 background-color: var(--admin-toolbar-color-white); 88 font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; Let's do this in https://www.drupal.org/project/navigation/issues/3403137
45 '!border-top*', 46 '!border-right*', 47 '!border-bottom*', 48 '!border-left*', 49 '!border-start*', 50 '!border-end*', 51 '!outline*', 52 ], 53 mediaQuery: true, 54 minPixelValue: 3, 55 // Prevent converting PX to REM for icon styles. These files have been 56 // added to use the `postcssUrl` plugin, but aren't compatible with 57 // `postcssPixelsToRem`. 58 exclude: (filePath) => filePath.match(/core\/modules.*\.icons\..*\.pcss\.css$/) 59 60 }), We shouldn't be removing this. @ckrina told me the reason was that the bootstrap theme sets the root font size to 14px. I understand that's an issue, but styling font sizes using pixel units can be problematic for some assistive technology as it can prevent text from resizing if the user requests it to do. Pixel units will not get past the core accessibility gate.
- css/components/admin-initial-styles.pcss.css 0 → 100644
1 /** 2 * @file 3 * Reset styles from parent theme. 4 * https://developer.mozilla.org/en-US/docs/Web/CSS/all 5 */ 6 7 :where([data-admin-ui-initial-styles]) { 8 all: initial; We shouldn't use
all: initial
here.initial
sets the styles back to the default value, which may not (especially in the case of Safari) be the same as the default user agent styles. Instead we should useall: revert
. You can see the reset that we recently created for the settings tray at https://git.drupalcode.org/project/drupal/-/blob/10.1.x/core/misc/dialog/off-canvas/css/reset.pcss.cssWe need to do something similar.
Edited by Mike Herchel