A automated port of Semantic UI to SCSS.
Experimental and incomplete, this won't give you a working SASS/SCSS port yet (if ever).
- Variables must be imported before components. Defining !default variables per component currently runs into the issue of themes overriding globals which would be ignored with !default and without it prevent overriding them ourselves.
- loadFonts mixin not implemented yet.
- The SCSS output needs some formatting love – particularly the variables.
@headerLineHeightOffset : (@lineHeight - 1em) / 2;
@headerTopMargin : ~"calc(2rem - "@lineHeightOffset~")";
@attachedTableWidth: ~"calc(100% + "-@attachedHorizontalOffset * 2~")";
calc(100% + --2px );
@shadowDistance: 0em;
@shadowOffset: (@shadowDistance / 2);
@shadowBoxShadow: 0px -@shadowDistance 0px 0px @borderColor inset;
/* Menu Item */
@itemVerticalPadding: 0.65rem;
@itemLineHeight: 1.2em;
/* Derived */
@selectedBorderEMWidth: 0.0714em;
@selectionItemActualHeight: (@itemVerticalPadding * 2) + @itemLineHeight + @selectedBorderEMWidth;
@headerHorizontalpadding
├── scss
│ ├── semantic
│ │ ├── _functions.scss (supporting functions, if any required)
│ │ ├── variables
│ │ │ └── _<theme-name>.scss (theme specific variables)
│ │ └── components
│ │ └── <theme-name>
│ │ └── _<component-name>.scss (definitions + theme overrides)
├── semantic.scss (imports default variables and all default theme components)
└── js
│ └── semantic
│ ├── <component-name>.js
│ └── <component-name>.min.js
├── semantic.js
└── semantic.min.js
Using bower:
bower install semantic-ui-scss
@import "semantic"; // all default semantic ui components
// your's scss
@charset "UTF-8";
@import "semantic/variables/default"; // default variables
@import "variables"; // your variables overriding the defaults
// desired semantic components
@import "semantic/components/default/site"; // includes global styling so it needs to be first
@import "semantic/components/default/accordion";
@import "semantic/components/default/breadcrumb";
@import "semantic/components/default/button";
// etc
// your's scss
@charset "UTF-8";
@import "semantic/variables/default"; // default variables
@import "semantic/variables/<theme-name>"; // theme's variables overriding defaults
@import "variables"; // your variables overriding the defaults
// desired semantic components
@import "semantic/components/<theme-name>/site"; // includes global styling so it needs to be first
@import "semantic/components/<theme-name>/accordion";
@import "semantic/components/<theme-name>/breadcrumb";
@import "semantic/components/<theme-name>/button";
// etc
// your's scss