Skip to content

Commit

Permalink
Added magento-ui sass and implemented multiple bug-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jordykommeren committed Nov 8, 2018
1 parent 8207ff3 commit 0241268
Show file tree
Hide file tree
Showing 47 changed files with 9,030 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/scss/_boilerplate.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Author: Epartment E-commerce B.V.
* License: MIT
*/
@import 'boilerplate/magento-ui/lib';

@import 'boilerplate/variables';
@import 'boilerplate/fonts';
Expand Down
4 changes: 0 additions & 4 deletions src/scss/boilerplate/_menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@
&:hover {
color: $menu-bar-menu-item-hover-color;
background: $menu-bar-menu-item-hover-background;
border-top: $menu-bar-menu-item-hover-border-top;
border-bottom: $menu-bar-menu-item-hover-border-bottom;
border-left: $menu-bar-menu-item-hover-border-left;
border-right: $menu-bar-menu-item-hover-border-right;
}
}
}
Expand Down
17 changes: 15 additions & 2 deletions src/scss/boilerplate/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ $color-boilerplate-gray: rgb(148, 148, 148) !default;
$color-primary-gradient-color: linear-gradient(red, orange) !default;
$color-secondary-gradient-color: linear-gradient(magenta, blue) !default;


/*
* Responsive breakpoints
*/
$breakpoint-mobile-small: $screen__xxs !default;
$breakpoint-mobile-portrait: $screen__xs !default;
$breakpoint-mobile-landscape: $screen__s !default;
$breakpoint-tablet-portrait: $screen__m !default;
$breakpoint-tablet-landscape: $screen__l !default;
$breakpoint-desktop: $screen__xl !default;

/*
* Fonts
*/
Expand Down Expand Up @@ -148,6 +159,7 @@ $button-default-border: 1px solid $color-boilerplate-blue !default;
$button-default-border-radius: 3px !default;
$button-default-color: $color-boilerplate-light-gray !default;
$button-default-font-family: $font-default-font-family-primary !default;
$button-default-line-height: $font-default-font-line-height;
$button-default-font-size: 1.4rem !default;
$button-default-font-weight: 400 !default;
$button-default-transition: all .34s ease-in-out !default;
Expand All @@ -157,14 +169,15 @@ $button-default-text-transform: none !default;
/* Button default states */
$button-default-hover-background-color: $color-boilerplate-orange !default;
$button-default-hover-border: 1px solid $color-boilerplate-blue !default;
$button-default-hover-color: $color-boilerplate-gray !default;
$button-default-hover-color: white !default;

/* Button primary */
$button-primary-background-color: $button-default-background-color !default;
$button-primary-border: $button-default-border !default;
$button-primary-border-radius: $button-default-border-radius;
$button-primary-color: $button-default-color !default;
$button-primary-font-family: $button-default-font-family !default;
$button-primary-font-family: $font-default-font-family-primary !default;
$button-primary-line-height: $font-default-font-line-height;
$button-primary-font-weight: 600 !default;
$button-primary-font-size: $button-default-font-size !default;
$button-primary-transition: $button-default-transition !default;
Expand Down
131 changes: 131 additions & 0 deletions src/scss/boilerplate/magento-ui/_actions-toolbar.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
//
// Actions-toolbar
// _____________________________________________

@mixin lib-actions-toolbar(
$_actions-toolbar-actions-position : $actions-toolbar-actions__position,
$_actions-toolbar-actions-reverse : $actions-toolbar-actions__reverse,
$_actions-toolbar-margin : $actions-toolbar__margin,
$_actions-toolbar-padding : $actions-toolbar__padding,
$_actions-toolbar-actions-margin : $actions-toolbar-actions__margin,
$_actions-toolbar-primary-actions-margin : $actions-toolbar-actions-primary__margin,
$_actions-toolbar-secondary-actions-margin : $actions-toolbar-actions-secondary__margin,
$_actions-toolbar-actions-links-margin-top : $actions-toolbar-actions-links__margin-top,
$_actions-toolbar-primary-actions-links-margin-top : $actions-toolbar-actions-links-primary__margin-top,
$_actions-toolbar-secondary-actions-links-margin-top : $actions-toolbar-actions-links-secondary__margin-top
) {
@include lib-clearfix();
@include lib-css(margin, $_actions-toolbar-margin);
@include lib-css(padding, $_actions-toolbar-padding);
@include _lib-actions-toolbar-align($_actions-toolbar-actions-position);
@include _lib-actions-toolbar-floats($_actions-toolbar-actions-position, $_actions-toolbar-actions-reverse);
.primary,
.secondary {
display: inline-block;

.action {
@include lib-css(margin, $_actions-toolbar-actions-margin);
}

a.action {
display: inline-block;
@include lib-css(margin-top, $_actions-toolbar-actions-links-margin-top);
}
}

.primary {
.action {
@include lib-css(margin, $_actions-toolbar-primary-actions-margin);
}

a.action {
@include lib-css(margin-top, $_actions-toolbar-primary-actions-links-margin-top);
}
}

.secondary {
.action {
@include lib-css(margin, $_actions-toolbar-secondary-actions-margin);
}

a.action {
@include lib-css(margin-top, $_actions-toolbar-secondary-actions-links-margin-top);
}
}
}

//
// Actions-toolbar-clear-floats
// ---------------------------------------------

@mixin lib-actions-toolbar-clear-floats() {
.primary,
.secondary {
display: block;
float: none;
}
}

//
// Internal use mixins
// ---------------------------------------------

@mixin _lib-actions-toolbar-align($_actions-toolbar-actions-position) {
@if $_actions-toolbar-actions-position != justify {
@include lib-css(text-align, $_actions-toolbar-actions-position);
}
}

@mixin _lib-actions-toolbar-floats(
$_actions-toolbar-actions-position,
$_actions-toolbar-actions-reverse
) {
@if $_actions-toolbar-actions-position == justify {
@if $_actions-toolbar-actions-reverse {
.primary {
float: right;
}
.secondary {
float: left;
}
}
@else {
.primary {
float: left;
}
.secondary {
float: right;
}
}
}
@else if $_actions-toolbar-actions-position == left {
@if $_actions-toolbar-actions-reverse {
.secondary {
float: left;
}
}
@else {
.primary {
float: left;
}
}
}
@else if $_actions-toolbar-actions-position == right {
@if $_actions-toolbar-actions-reverse {
.primary {
float: right;
}
}
@else {
.secondary {
float: right;
}
}
}
@else if $_actions-toolbar-actions-position == center {
.primary,
.secondary {
vertical-align: top;
}
}
}
175 changes: 175 additions & 0 deletions src/scss/boilerplate/magento-ui/_breadcrumbs.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
//
// Breadcrumbs
// _____________________________________________

@mixin lib-breadcrumbs(
$_breadcrumbs-font-size : $breadcrumbs__font-size,
$_breadcrumbs-display : $breadcrumbs__display,
$_breadcrumbs-container-margin : $breadcrumbs__container-margin,
$_breadcrumbs-padding : $breadcrumbs__padding,

// Breadcrumbs separating symbol
$_breadcrumbs-separator-symbol : $breadcrumbs-separator__symbol,
$_breadcrumbs-separator-color : $breadcrumbs-separator__color,

// Use icon as a separating symbol
$_breadcrumbs-icon-use : $breadcrumbs-icon__use,
$_breadcrumbs-icon-font-content : $breadcrumbs-icon__font-content,
$_icon-font : $breadcrumbs-icon__font,
$_icon-font-size : $breadcrumbs-icon__font-size,
$_icon-font-line-height : $breadcrumbs-icon__font-line-height,
$_icon-font-color : $breadcrumbs-icon__font-color,
$_icon-font-margin : $breadcrumbs-icon__font-margin,
$_icon-font-vertical-align : $breadcrumbs-icon__font-vertical-align,

// Breadcrumbs current
$_breadcrumbs-current-color : $breadcrumbs-current__color,
$_breadcrumbs-current-font-weight : $breadcrumbs-current__font-weight,
$_breadcrumbs-current-background : $breadcrumbs-current__background,
$_breadcrumbs-current-border : $breadcrumbs-current__border,
$_breadcrumbs-current-gradient : $breadcrumbs-current__gradient,
$_breadcrumbs-current-gradient-direction : $breadcrumbs-current__gradient-direction,
$_breadcrumbs-current-gradient-color-start : $breadcrumbs-current__gradient-color-start,
$_breadcrumbs-current-gradient-color-end : $breadcrumbs-current__gradient-color-end,

// Breadcrumbs link - gradient
$_breadcrumbs-link-gradient : $breadcrumbs-link__gradient,
$_breadcrumbs-link-gradient-direction : $breadcrumbs-link__gradient-direction,

// Breadcrumbs link color - default
$_breadcrumbs-link-color : $breadcrumbs-link__color,
$_breadcrumbs-link-background : $breadcrumbs-link__background,
$_breadcrumbs-link-border : $breadcrumbs-link__border,
$_breadcrumbs-link-text-decoration : $breadcrumbs-link__text-decoration,
$_breadcrumbs-link-gradient-color-start : $breadcrumbs-link__gradient-color-start,
$_breadcrumbs-link-gradient-color-end : $breadcrumbs-link__gradient-color-end,

// Breadcrumbs link - visited
$_breadcrumbs-link-color-visited : $breadcrumbs-link__visited__color,
$_breadcrumbs-link-background-visited : $breadcrumbs-link__visited__background,
$_breadcrumbs-link-border-visited : $breadcrumbs-link__visited__border,
$_breadcrumbs-link-text-decoration-visited : $breadcrumbs-link__visited__text-decoration,
$_breadcrumbs-link-gradient-color-start-visited : $breadcrumbs-link__visited__gradient-color-start,
$_breadcrumbs-link-gradient-color-end-visited : $breadcrumbs-link__visited__gradient-color-end,

// Breadcrumbs link - hover
$_breadcrumbs-link-color-hover : $breadcrumbs-link__hover__color,
$_breadcrumbs-link-background-hover : $breadcrumbs-link__hover__background,
$_breadcrumbs-link-border-hover : $breadcrumbs-link__hover__border,
$_breadcrumbs-link-text-decoration-hover : $breadcrumbs-link__hover__text-decoration,
$_breadcrumbs-link-gradient-color-start-hover : $breadcrumbs-link__hover__gradient-color-start,
$_breadcrumbs-link-gradient-color-end-hover : $breadcrumbs-link__hover__gradient-color-end,

// Breadcrumbs link - active
$_breadcrumbs-link-color-active : $breadcrumbs-link__active__color,
$_breadcrumbs-link-background-active : $breadcrumbs-link__active__background,
$_breadcrumbs-link-border-active : $breadcrumbs-link__active__border,
$_breadcrumbs-link-text-decoration-active : $breadcrumbs-link__active__text-decoration,
$_breadcrumbs-link-gradient-color-start-active : $breadcrumbs-link__active__gradient-color-start,
$_breadcrumbs-link-gradient-color-end-active : $breadcrumbs-link__active__gradient-color-end
) {
@include lib-css(margin, $_breadcrumbs-container-margin);
.items {
@include lib-font-size($_breadcrumbs-font-size);
@include lib-css(color, $_breadcrumbs-current-color);
@include lib-list-inline();
}

.item {
margin: 0;
}

a {
@include lib-css(background, $_breadcrumbs-link-background);
@include lib-background-gradient(
$_breadcrumbs-link-gradient-color-start,
$_breadcrumbs-link-gradient-color-end,
$_breadcrumbs-link-gradient-direction,
$_breadcrumbs-link-gradient
);
@include lib-css(border, $_breadcrumbs-link-border);
@include lib-css(color, $_breadcrumbs-link-color);
@include lib-css(display, $_breadcrumbs-display);
@include lib-css(padding, $_breadcrumbs-padding);
@include lib-css(text-decoration, $_breadcrumbs-link-text-decoration);

&:visited {
@include lib-css(background, $_breadcrumbs-link-background-visited);
@include lib-background-gradient(
$_breadcrumbs-link-gradient-color-start-visited,
$_breadcrumbs-link-gradient-color-end-visited,
$_breadcrumbs-link-gradient-direction,
$_breadcrumbs-link-gradient
);
@include lib-css(border, $_breadcrumbs-link-border-visited);
@include lib-css(color, $_breadcrumbs-link-color-visited);
@include lib-css(text-decoration, $_breadcrumbs-link-text-decoration-visited);
}

&:hover {
@include lib-css(background, $_breadcrumbs-link-background-hover);
@include lib-background-gradient(
$_breadcrumbs-link-gradient-color-start-hover,
$_breadcrumbs-link-gradient-color-end-hover,
$_breadcrumbs-link-gradient-direction,
$_breadcrumbs-link-gradient
);
@include lib-css(border, $_breadcrumbs-link-border-hover);
@include lib-css(color, $_breadcrumbs-link-color-hover);
@include lib-css(text-decoration, $_breadcrumbs-link-text-decoration-hover);
}

&:active {
@include lib-css(background, $_breadcrumbs-link-background-active);
@include lib-background-gradient(
$_breadcrumbs-link-gradient-color-start-active,
$_breadcrumbs-link-gradient-color-end-active,
$_breadcrumbs-link-gradient-direction,
$_breadcrumbs-link-gradient
);
@include lib-css(border, $_breadcrumbs-link-border-active);
@include lib-css(color, $_breadcrumbs-link-color-active);
@include lib-css(text-decoration, $_breadcrumbs-link-text-decoration-active);
}
}

strong {
@include lib-css(background, $_breadcrumbs-current-background);
@include lib-background-gradient(
$_breadcrumbs-current-gradient-color-start,
$_breadcrumbs-current-gradient-color-end,
$_breadcrumbs-current-gradient-direction,
$_breadcrumbs-current-gradient
);
@include lib-css(border, $_breadcrumbs-current-border);
@include lib-css(display, $_breadcrumbs-display);
@include lib-css(font-weight, $_breadcrumbs-current-font-weight);
@include lib-css(padding, $_breadcrumbs-padding);
}

// Insert separating symbol to "content"
@if $_breadcrumbs-separator-symbol != '' and $_breadcrumbs-separator-symbol != false {
.item:not(:last-child) {
&:after {
@include lib-css(color, $_breadcrumbs-separator-color);
@include lib-css(content, $_breadcrumbs-separator-symbol);
}
}
}

// Use font icon as a separating symbol
@if $_breadcrumbs-icon-use {
.item:not(:last-child) {
@include lib-icon-font(
$_icon-font-content: $_breadcrumbs-icon-font-content,
$_icon-font: $_icon-font,
$_icon-font-size: $_icon-font-size,
$_icon-font-line-height: $_icon-font-line-height,
$_icon-font-color: $_icon-font-color,
$_icon-font-margin: $_icon-font-margin,
$_icon-font-vertical-align: $_icon-font-vertical-align,
$_icon-font-position: after
);
}
}
}
Loading

0 comments on commit 0241268

Please sign in to comment.