From b926f96da777baf3a0e61fd6e6e19cb969cb0780 Mon Sep 17 00:00:00 2001 From: silverwind Date: Tue, 16 May 2023 06:13:30 +0200 Subject: [PATCH] Reorganize CSS files (#24739) Reorganize various CSS files for clarity, group together by subdirectory in `index.css`. This reorders some of the rules, but I don't think it should introduce any issues because of that. --- .stylelintrc.yaml | 2 +- web_src/css/{runner.css => actions.css} | 0 web_src/css/base.css | 10 +++++ .../css/{editor.css => editor/fileeditor.css} | 0 web_src/css/{console => features}/console.css | 0 web_src/css/{ => features}/tribute.css | 0 web_src/css/index.css | 42 +++++++++++-------- web_src/css/{ => modules}/animations.css | 0 web_src/css/{organization.css => org.css} | 0 web_src/css/{repository.css => repo.css} | 0 .../css/{repository => repo}/issue-label.css | 0 .../css/{repository => repo}/issue-list.css | 0 web_src/css/{code => repo}/linebutton.css | 0 .../css/{repository => repo}/list-header.css | 0 .../css/{repository => repo}/release-tag.css | 0 web_src/css/svg.css | 9 ---- 16 files changed, 35 insertions(+), 28 deletions(-) rename web_src/css/{runner.css => actions.css} (100%) rename web_src/css/{editor.css => editor/fileeditor.css} (100%) rename web_src/css/{console => features}/console.css (100%) rename web_src/css/{ => features}/tribute.css (100%) rename web_src/css/{ => modules}/animations.css (100%) rename web_src/css/{organization.css => org.css} (100%) rename web_src/css/{repository.css => repo.css} (100%) rename web_src/css/{repository => repo}/issue-label.css (100%) rename web_src/css/{repository => repo}/issue-list.css (100%) rename web_src/css/{code => repo}/linebutton.css (100%) rename web_src/css/{repository => repo}/list-header.css (100%) rename web_src/css/{repository => repo}/release-tag.css (100%) delete mode 100644 web_src/css/svg.css diff --git a/.stylelintrc.yaml b/.stylelintrc.yaml index 220af352a..c6289fe26 100644 --- a/.stylelintrc.yaml +++ b/.stylelintrc.yaml @@ -5,7 +5,7 @@ ignoreFiles: - "**/*.go" overrides: - - files: ["**/chroma/*", "**/codemirror/*", "**/standalone/*", "**/console/*"] + - files: ["**/chroma/*", "**/codemirror/*", "**/standalone/*", "**/console.css"] rules: scale-unlimited/declaration-strict-value: null - files: ["**/chroma/*", "**/codemirror/*"] diff --git a/web_src/css/runner.css b/web_src/css/actions.css similarity index 100% rename from web_src/css/runner.css rename to web_src/css/actions.css diff --git a/web_src/css/base.css b/web_src/css/base.css index 30a9c6313..bcf7b0811 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -321,6 +321,16 @@ progress::-moz-progress-bar { opacity: 1 !important; } +.svg { + display: inline-block; + vertical-align: text-top; + fill: currentcolor; +} + +.middle .svg { + vertical-align: middle; +} + .unselectable, .button, .lines-num, diff --git a/web_src/css/editor.css b/web_src/css/editor/fileeditor.css similarity index 100% rename from web_src/css/editor.css rename to web_src/css/editor/fileeditor.css diff --git a/web_src/css/console/console.css b/web_src/css/features/console.css similarity index 100% rename from web_src/css/console/console.css rename to web_src/css/features/console.css diff --git a/web_src/css/tribute.css b/web_src/css/features/tribute.css similarity index 100% rename from web_src/css/tribute.css rename to web_src/css/features/tribute.css diff --git a/web_src/css/index.css b/web_src/css/index.css index c7701809c..c6690f3ff 100644 --- a/web_src/css/index.css +++ b/web_src/css/index.css @@ -1,47 +1,53 @@ -@import "./animations.css"; +@import "./modules/animations.css"; +@import "./modules/tippy.css"; +@import "./modules/modal.css"; +@import "./modules/breadcrumb.css"; +@import "./modules/card.css"; +@import "./modules/comment.css"; + @import "./shared/issuelist.css"; @import "./shared/repoorg.css"; + @import "./features/dropzone.css"; @import "./features/gitgraph.css"; @import "./features/heatmap.css"; @import "./features/imagediff.css"; @import "./features/codeeditor.css"; @import "./features/projects.css"; -@import "./modules/tippy.css"; -@import "./modules/modal.css"; -@import "./modules/breadcrumb.css"; -@import "./modules/card.css"; -@import "./modules/comment.css"; -@import "./code/linebutton.css"; +@import "./features/tribute.css"; +@import "./features/console.css"; + @import "./markup/content.css"; @import "./markup/codecopy.css"; @import "./markup/asciicast.css"; @import "./chroma/base.css"; @import "./chroma/light.css"; + @import "./codemirror/base.css"; @import "./codemirror/light.css"; -@import "./console/console.css"; -@import "./svg.css"; -@import "./tribute.css"; @import "./font_i18n.css"; @import "./base.css"; @import "./home.css"; @import "./install.css"; @import "./form.css"; -@import "./repository.css"; -@import "./repository/release-tag.css"; -@import "./repository/issue-label.css"; -@import "./repository/issue-list.css"; -@import "./repository/list-header.css"; -@import "./editor.css"; + +@import "./repo.css"; +@import "./repo/release-tag.css"; +@import "./repo/issue-label.css"; +@import "./repo/issue-list.css"; +@import "./repo/list-header.css"; +@import "./repo/linebutton.css"; + +@import "./editor/fileeditor.css"; @import "./editor/combomarkdowneditor.css"; -@import "./organization.css"; + +@import "./org.css"; @import "./user.css"; @import "./dashboard.css"; @import "./admin.css"; @import "./explore.css"; @import "./review.css"; -@import "./runner.css"; +@import "./actions.css"; @import "./helpers.css"; diff --git a/web_src/css/animations.css b/web_src/css/modules/animations.css similarity index 100% rename from web_src/css/animations.css rename to web_src/css/modules/animations.css diff --git a/web_src/css/organization.css b/web_src/css/org.css similarity index 100% rename from web_src/css/organization.css rename to web_src/css/org.css diff --git a/web_src/css/repository.css b/web_src/css/repo.css similarity index 100% rename from web_src/css/repository.css rename to web_src/css/repo.css diff --git a/web_src/css/repository/issue-label.css b/web_src/css/repo/issue-label.css similarity index 100% rename from web_src/css/repository/issue-label.css rename to web_src/css/repo/issue-label.css diff --git a/web_src/css/repository/issue-list.css b/web_src/css/repo/issue-list.css similarity index 100% rename from web_src/css/repository/issue-list.css rename to web_src/css/repo/issue-list.css diff --git a/web_src/css/code/linebutton.css b/web_src/css/repo/linebutton.css similarity index 100% rename from web_src/css/code/linebutton.css rename to web_src/css/repo/linebutton.css diff --git a/web_src/css/repository/list-header.css b/web_src/css/repo/list-header.css similarity index 100% rename from web_src/css/repository/list-header.css rename to web_src/css/repo/list-header.css diff --git a/web_src/css/repository/release-tag.css b/web_src/css/repo/release-tag.css similarity index 100% rename from web_src/css/repository/release-tag.css rename to web_src/css/repo/release-tag.css diff --git a/web_src/css/svg.css b/web_src/css/svg.css deleted file mode 100644 index b63445eb4..000000000 --- a/web_src/css/svg.css +++ /dev/null @@ -1,9 +0,0 @@ -.svg { - display: inline-block; - vertical-align: text-top; - fill: currentcolor; -} - -.middle .svg { - vertical-align: middle; -}