From 6bfe9b14c6104c238c9ca9ceaa87eec4633b399d Mon Sep 17 00:00:00 2001 From: Istvan Soos Date: Fri, 24 Jul 2026 10:37:03 +0200 Subject: [PATCH 1/2] Further cleanup after removing material styles. --- app/test/frontend/static_files_test.dart | 9 --------- pkg/web_css/lib/src/_base.scss | 5 ----- pkg/web_css/lib/src/_variables.scss | 15 --------------- 3 files changed, 29 deletions(-) diff --git a/app/test/frontend/static_files_test.dart b/app/test/frontend/static_files_test.dart index 7a00e887c9..cdb3a29dcb 100644 --- a/app/test/frontend/static_files_test.dart +++ b/app/test/frontend/static_files_test.dart @@ -159,10 +159,6 @@ void main() { '/static/js/script.dart.js.info.data', '/static/js/script.dart.js.info.json', '/static/js/script.dart.js.map', - '/static/material/bundle/script.min.js.map', - '/static/material/bundle/styles.css.map', - '/static/material/bundle/script.min.js.LICENSE.txt', - '/static/material/bundle/styles.min.js', ]) // Images that we are not currently using but keep alongside of the used version. ..removeAll([ @@ -175,15 +171,10 @@ void main() { e.startsWith('/static/js/script.dart.js_') && (e.endsWith('.part.js') || e.endsWith('.part.js.map')), ) - // material build parts may be present in local dev environment - ..removeWhere((e) => e.startsWith('/static/material/node_modules/')) // files that are in the third-party directory but not essential to serving ..removeAll([ '/static/css/github-markdown.css-license.txt', '/static/highlight/readme.md', - '/static/material/package-lock.json', - '/static/material/package.json', - '/static/material/README.md', ]) // third-party CSS files that are included in the style.scss are no longer referenced elsewhere ..removeAll([ diff --git a/pkg/web_css/lib/src/_base.scss b/pkg/web_css/lib/src/_base.scss index 99acf53682..7da58e3d9d 100644 --- a/pkg/web_css/lib/src/_base.scss +++ b/pkg/web_css/lib/src/_base.scss @@ -361,11 +361,6 @@ pre { display: inline-block; } -.-pub-like-button { - --mdc-theme-primary: #f8f8f8; - --mdc-theme-on-primary: var(--pub-neutral-textColor); -} - .-pub-like-button-img { opacity: 0.7; } diff --git a/pkg/web_css/lib/src/_variables.scss b/pkg/web_css/lib/src/_variables.scss index dbd41537fe..cfaba421b5 100644 --- a/pkg/web_css/lib/src/_variables.scss +++ b/pkg/web_css/lib/src/_variables.scss @@ -84,11 +84,6 @@ --pub-button-cancel-background: #f0f0f0; --pub-button-cancel-text-color: #000000; - // Material Design theme customizations - --mdc-theme-primary: #1967d2; - --mdc-theme-secondary: #0066d9; - --mdc-typography-font-family: var(--pub-font-family-body); - --pub-downloads-chart-color-0: var(--pub-markdown-alert-note); --pub-downloads-chart-color-bg-0: rgb(9, 105, 218, 0.3); --pub-downloads-chart-color-1: var(--pub-markdown-alert-caution); @@ -222,16 +217,6 @@ --pub-downloads-chart-frame-color: #55585a; --pub-downloads-chart-tooltip-background: rgba(18, 19, 23, 0.9); - // Material Design theme customizations - --mdc-theme-surface: var(--pub-neutral-bgColor); - --mdc-theme-on-primary: var(--pub-neutral-textColor); - --mdc-theme-on-secondary: var(--pub-neutral-textColor); - --mdc-theme-on-surface: var(--pub-neutral-textColor); - --mdc-filled-button-container-color: rgba(255, 255, 255, 0.1); - --mdc-filled-button-label-text-color: var(--pub-neutral-textColor); - --mdc-protected-button-disabled-container-color: rgba(255, 255, 255, 0.1); - --mdc-protected-button-disabled-label-text-color: var(--pub-neutral-textColor); - // Most of our SVG images are black on transparent background and they // are almost invisible in dark mode. Ideally we would have different // images for dark mode, or override their `fill` or `stroke` properties From ac31fe6e212f52c6bd0d6a1bf23d9a89d3b4deca Mon Sep 17 00:00:00 2001 From: Istvan Soos Date: Fri, 24 Jul 2026 10:44:50 +0200 Subject: [PATCH 2/2] Also update test --- pkg/web_css/test/variables_test.dart | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pkg/web_css/test/variables_test.dart b/pkg/web_css/test/variables_test.dart index ecf4b4d6fc..2a2cade354 100644 --- a/pkg/web_css/test/variables_test.dart +++ b/pkg/web_css/test/variables_test.dart @@ -50,9 +50,6 @@ void main() { await File('lib/src/_variables.scss').readAsLines(), ).toSet(); - // remove Material design variables - variables.removeWhere((v) => v.startsWith('--mdc-')); - for (final f in Directory('../../third_party/site-shared/dash_design/lib/') .listSync(recursive: true) @@ -104,10 +101,6 @@ void main() { for (final m in varRegExp.allMatches(content)) { final name = m.group(1)!.trim(); if (!variables.contains(name)) { - // exempt Material Design variables - if (name.startsWith('--mdc-')) { - continue; - } // exempt known dash variables if (name.startsWith('--dash-') && dashVariables.contains(name)) { continue;