Skip to content

Commit

Permalink
fix(rtlcss): separate CSS into LTR and RTL
Browse files Browse the repository at this point in the history
Fixed #494
  • Loading branch information
razonyang committed Apr 2, 2022
1 parent ccb4070 commit a687125
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 3 deletions.
48 changes: 47 additions & 1 deletion assets/main/scss/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,49 @@
/*!rtl:begin:ignore*/
@import 'index.rtl';
// Base
@import 'bootstrap';
/*! purgecss start ignore */
@import 'colors';
@import 'palettes';
@import 'modes';
@import 'root';
@import 'reboot';

// Components
@import 'anchor';
@import 'archives';
@import 'blockquote';
@import 'button';
@import 'breadcrumb';
@import 'card';
@import 'component';
@import 'code';
@import 'dropdown';
@import 'footer';
@import 'form';
@import 'highlight';
@import 'image';
@import 'main';
@import 'modal';
@import 'navbar';
@import 'offcanvas';
@import 'pagination';
// @import 'popover';
@import 'post';
@import 'profile';
@import 'scrollbar';
@import 'scroll-to-top';
@import 'search';
@import 'sidebar';
@import 'social-share';
@import 'surface';
@import 'table';
@import 'taxonomy';
@import 'top-app-bar';
@import 'loading-bar';
@import 'snackbar';
@import 'docs';
@import 'carousel';
@import 'custom';
/*! purgecss end ignore */
@import 'faq';
/*!rtl:end:ignore*/
3 changes: 1 addition & 2 deletions layouts/partials/assets/main/css.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
{{- $variables := resources.Get "main/scss/_variables.scss" | resources.ExecuteAsTemplate "main/scss/_variables.scss" . -}}
{{- $config := resources.Get "main/scss/_config.scss" | resources.ExecuteAsTemplate "main/scss/_config.scss" . -}}
{{- $main := resources.Get (printf "main/scss/index%s.scss" $dir) -}}
{{- $custom := resources.Get "main/scss/_custom.scss" | resources.ExecuteAsTemplate "main/scss/_custom.scss" . -}}
{{- $style := slice $variables $config $main $custom | resources.Concat (printf "main/scss/main%s.css" $dir) | toCSS $options | resources.PostCSS | fingerprint | resources.PostProcess -}}
{{- $style := slice $variables $config $main | resources.Concat (printf "main/scss/main%s.css" $dir) | toCSS $options | resources.PostCSS | fingerprint | resources.PostProcess -}}
<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}" crossorigin="anonymous">
{{- range .Site.Params.customCSS -}}
<link rel="stylesheet" href="{{ absURL . }}" crossorigin="anonymous">
Expand Down

0 comments on commit a687125

Please sign in to comment.