Skip to content

Split inline CSS and SVG icons into separate files#2

Open
Copilot wants to merge 2 commits intomainfrom
copilot/split-css-and-svg-files
Open

Split inline CSS and SVG icons into separate files#2
Copilot wants to merge 2 commits intomainfrom
copilot/split-css-and-svg-files

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 5, 2026

index.html from PR #1 embeds all styles in a <style> block and all icon paths as inline SVG strings in JS variables. This splits them into dedicated files.

Changes

  • style.css — extracted from the <style> block; linked via <link rel="stylesheet" href="style.css">
  • icon-dir.svg, icon-file.svg, icon-check.svg, icon-branch.svg, icon-chevron.svg — each icon extracted into its own SVG file containing a <symbol id="icon"> with the icon's path
  • index.html — inline SVGs (both static HTML and JS ICON_* variables) replaced with <svg><use> references to the individual icon files:
// before
var ICON_DIR = '<svg width="16" height="16" viewBox="0 0 16 16"><path d="M1.75 1A1.75..."/></svg>';

// after
var ICON_DIR = '<svg width="16" height="16"><use href="icon-dir.svg#icon"></use></svg>';

CSS fill inheritance through <use> shadow DOM is preserved, so dark-mode theming continues to work without changes to style.css.

@casperdcl casperdcl closed this Apr 5, 2026
casperdcl pushed a commit that referenced this pull request Apr 5, 2026
Redesign with Primer tokens and functional styling
@casperdcl casperdcl reopened this Apr 5, 2026
@casperdcl casperdcl force-pushed the copilot/split-css-and-svg-files branch from bfe0d45 to 1d7d072 Compare April 5, 2026 22:58
@casperdcl casperdcl marked this pull request as ready for review April 5, 2026 23:02
@casperdcl
Copy link
Copy Markdown
Member

@copilot split icons.svg into separate files

Copy link
Copy Markdown
Author

Copilot AI commented Apr 5, 2026

@copilot split icons.svg into separate files

Done in 2abb3bb. icons.svg has been replaced with five individual files — icon-dir.svg, icon-file.svg, icon-check.svg, icon-branch.svg, and icon-chevron.svg — each containing a <symbol id="icon"> with its path. All references in index.html updated accordingly.

Copilot AI requested a review from casperdcl April 5, 2026 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants