Skip to content

Commit

Permalink
Fix navbar rtl
Browse files Browse the repository at this point in the history
  • Loading branch information
jgthms committed May 17, 2020
1 parent ff70b7f commit 9663e25
Show file tree
Hide file tree
Showing 14 changed files with 107 additions and 80 deletions.
74 changes: 39 additions & 35 deletions css/bulma-rtl.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion css/bulma-rtl.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/bulma-rtl.min.css

Large diffs are not rendered by default.

25 changes: 16 additions & 9 deletions css/bulma.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion css/bulma.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/bulma.min.css

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,16 @@
"rimraf": "^3.0.2"
},
"scripts": {
"build": "npm run build-clean && npm run build-sass && npm run build-autoprefix && npm run build-cleancss",
"build": "npm run build-sass && npm run build-autoprefix && npm run build-cleancss",
"build-autoprefix": "postcss --use autoprefixer --map false --output css/bulma.css css/bulma.css",
"build-cleancss": "cleancss -o css/bulma.min.css css/bulma.css",
"build-clean": "rimraf css",
"build-sass": "node-sass --output-style expanded --source-map true bulma.sass css/bulma.css",
"deploy": "npm run build",
"clean": "rimraf css",
"rtl": "npm run rtl-sass && npm run rtl-autoprefix && npm run rtl-cleancss",
"rtl-sass": "node-sass --output-style expanded --source-map true bulma-rtl.sass css/bulma-rtl.css",
"rtl-autoprefix": "postcss --use autoprefixer --map false --output css/bulma-rtl.css css/bulma-rtl.css",
"rtl-cleancss": "cleancss -o css/bulma-rtl.min.css css/bulma-rtl.css",
"deploy": "npm run clean && npm run build && npm run rtl",
"start": "npm run build-sass -- --watch"
},
"files": [
Expand Down
8 changes: 4 additions & 4 deletions sass/components/navbar.sass
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,12 @@ a.navbar-item,
flex-shrink: 1

.navbar-link:not(.is-arrowless)
padding-right: 2.5em
+ltr-property("padding", 2.5em)
&::after
@extend %arrow
border-color: $navbar-dropdown-arrow
margin-top: -0.375em
right: 1.125em
+ltr-position(1.125em)

.navbar-dropdown
font-size: 0.875rem
Expand Down Expand Up @@ -359,7 +359,7 @@ a.navbar-item,
box-shadow: 0 8px 8px bulmaRgba($scheme-invert, 0.1)
display: none
font-size: 0.875rem
left: 0
+ltr-position(0, false)
min-width: 100%
position: absolute
top: 100%
Expand All @@ -368,7 +368,7 @@ a.navbar-item,
padding: 0.375rem 1rem
white-space: nowrap
a.navbar-item
padding-right: 3rem
+ltr-property("padding", 3rem)
&:focus,
&:hover
background-color: $navbar-dropdown-item-hover-background-color
Expand Down
12 changes: 8 additions & 4 deletions sass/components/tabs.sass
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,18 @@ $tabs-toggle-link-active-color: $link-invert !default
+ltr-property("margin", -#{$tabs-toggle-link-border-width}, false)
&:first-child a
+ltr
border-radius: $tabs-toggle-link-radius 0 0 $tabs-toggle-link-radius
border-top-left-radius: $tabs-toggle-link-radius
border-bottom-left-radius: $tabs-toggle-link-radius
+rtl
border-radius: 0 $tabs-toggle-link-radius $tabs-toggle-link-radius 0
border-top-right-radius: $tabs-toggle-link-radius
border-bottom-right-radius: $tabs-toggle-link-radius
&:last-child a
+ltr
border-radius: 0 $tabs-toggle-link-radius $tabs-toggle-link-radius 0
border-top-right-radius: $tabs-toggle-link-radius
border-bottom-right-radius: $tabs-toggle-link-radius
+rtl
border-radius: $tabs-toggle-link-radius 0 0 $tabs-toggle-link-radius
border-top-left-radius: $tabs-toggle-link-radius
border-bottom-left-radius: $tabs-toggle-link-radius
&.is-active
a
background-color: $tabs-toggle-link-active-background-color
Expand Down
4 changes: 2 additions & 2 deletions sass/elements/button.sass
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,9 @@ $button-static-border-color: $border !default
&:not(:last-child)
border-bottom-right-radius: 0
border-top-right-radius: 0
margin-right: -1px
+ltr-property("margin", -1px)
&:last-child
margin-right: 0
+ltr-property("margin", 0)
&:hover,
&.is-hovered
z-index: 2
Expand Down

0 comments on commit 9663e25

Please sign in to comment.