Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: make breadcrumbs tighter #234

Merged
merged 2 commits into from
Apr 14, 2022
Merged

Conversation

lex111
Copy link
Contributor

@lex111 lex111 commented Apr 14, 2022

Currently the spacing of breadcrumbs seems rather large, I suggest making them more compact.

Before After
image image

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 14, 2022
@github-actions
Copy link

github-actions bot commented Apr 14, 2022

Dist CSS Diff

diff --git a/packages/core/dist/css/default/default.css b/packages/core/dist-branch/css/default/default.css
index 9610f30..e3ddea7 100644
--- a/packages/core/dist/css/default/default.css
+++ b/packages/core/dist-branch/css/default/default.css
@@ -274,11 +274,11 @@
   --ifm-badge-padding-horizontal: calc(var(--ifm-spacing-horizontal) * 0.5);
   --ifm-badge-padding-vertical: calc(var(--ifm-spacing-vertical) * 0.25);
   --ifm-breadcrumb-border-radius: 1.5rem;
-  --ifm-breadcrumb-spacing: 0.0625rem;
+  --ifm-breadcrumb-spacing: 0.5rem;
   --ifm-breadcrumb-color-active: var(--ifm-color-primary);
   --ifm-breadcrumb-item-background-active: var(--ifm-hover-overlay);
-  --ifm-breadcrumb-padding-horizontal: 1rem;
-  --ifm-breadcrumb-padding-vertical: 0.5rem;
+  --ifm-breadcrumb-padding-horizontal: 0.8rem;
+  --ifm-breadcrumb-padding-vertical: 0.4rem;
   --ifm-breadcrumb-size-multiplier: 1;
   --ifm-breadcrumb-separator: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 256 256"><g><g><polygon points="79.093,0 48.907,30.187 146.72,128 48.907,225.813 79.093,256 207.093,128"/></g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g></svg>');
   --ifm-breadcrumb-separator-filter: none;
@@ -1706,14 +1706,6 @@ hr {
     display: inline-block;
   }
 
-.breadcrumbs__item:not(:first-child) {
-      margin-left: var(--ifm-breadcrumb-spacing);
-    }
-
-.breadcrumbs__item:not(:last-child) {
-      margin-right: var(--ifm-breadcrumb-spacing);
-    }
-
 .breadcrumbs__item:not(:last-child):after {
       background: var(--ifm-breadcrumb-separator) center;
       content: ' ';
@@ -1724,7 +1716,7 @@ hr {
           var(--ifm-breadcrumb-size-multiplier) *
           var(--ifm-breadcrumb-separator-size-multiplier)
       );
-        margin: 0 0.5rem;
+      margin: 0 var(--ifm-breadcrumb-spacing);
       opacity: 0.5;
       width: calc(
         var(--ifm-breadcrumb-separator-size) *

@github-actions
Copy link

github-actions bot commented Apr 14, 2022

Size Change: -1.36 kB (0%)

Total Size: 579 kB

Filename Size Change
./packages/core/dist/css/default-dark/default-dark-rtl.css 84.1 kB -204 B (0%)
./packages/core/dist/css/default-dark/default-dark-rtl.min.css 59.1 kB -135 B (0%)
./packages/core/dist/css/default-dark/default-dark.css 84.1 kB -204 B (0%)
./packages/core/dist/css/default-dark/default-dark.min.css 59 kB -135 B (0%)
./packages/core/dist/css/default/default-rtl.css 82 kB -204 B (0%)
./packages/core/dist/css/default/default-rtl.min.css 57.9 kB -135 B (0%)
./packages/core/dist/css/default/default.css 82 kB -204 B (0%)
./packages/core/dist/css/default/default.min.css 57.9 kB -135 B (0%)
ℹ️ View Unchanged
Filename Size
./packages/core/dist/js/alerts.js 409 B
./packages/core/dist/js/alerts.min.js 409 B
./packages/core/dist/js/button-groups.js 267 B
./packages/core/dist/js/button-groups.min.js 267 B
./packages/core/dist/js/dropdowns.js 1.01 kB
./packages/core/dist/js/dropdowns.min.js 1.01 kB
./packages/core/dist/js/menu.js 2.4 kB
./packages/core/dist/js/menu.min.js 2.4 kB
./packages/core/dist/js/navbar.js 1.08 kB
./packages/core/dist/js/navbar.min.js 1.08 kB
./packages/core/dist/js/pills.js 270 B
./packages/core/dist/js/pills.min.js 270 B
./packages/core/dist/js/radio-behavior.js 705 B
./packages/core/dist/js/radio-behavior.min.js 705 B
./packages/core/dist/js/tabs.js 267 B
./packages/core/dist/js/tabs.min.js 267 B

compressed-size-action

@netlify
Copy link

netlify bot commented Apr 14, 2022

Deploy Preview for infima ready!

Name Link
🔨 Latest commit 9330af0
🔍 Latest deploy log https://app.netlify.com/sites/infima/deploys/6257d75e6d687b0009617760
😎 Deploy Preview https://deploy-preview-234--infima.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@slorber
Copy link
Collaborator

slorber commented Apr 14, 2022

👍

not a huge difference for me but why not

@slorber slorber merged commit 8ed53a8 into main Apr 14, 2022
@Josh-Cena Josh-Cena deleted the lex111/breadcrumbs-optimize branch April 14, 2022 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants