Skip to content
This repository has been archived by the owner on Jan 20, 2021. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/1.2.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
oBlissing committed Dec 18, 2017
2 parents 3910cab + 101db93 commit 788d7b1
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 240 deletions.
117 changes: 0 additions & 117 deletions custom/buttons.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,74 +16,6 @@ Texten på en knapp ska vara kort och beskriva handlingen som knappen utför.
Styleguide 7.1
*/

.btn-mixin() {
box-shadow: inset 0 0 2em 0em rgba(0, 0, 0, 0);
border-radius: 3px;
font-size: 16px;
font-weight: 400;
padding: 4px 10px;
border-style: solid;
border-width: 1px;
transition: 0.5s ease;
transition-property: color, box-shadow;
&:active, .active, .open {
box-shadow: inset 0 0 2em 0em rgba(0, 0, 0, 0.3);
}
&.btn-lg {
padding: 10px 16px;
font-size: 18px;
border-radius: 5px;
}
&.btn-sm {
padding: 5px 10px;
font-size: 12px;
border-radius: 2px;
}
&.btn-xs {
padding: 1px 5px;
font-size: 12px;
border-radius: 2px;
}
}

.btn, button {
&:hover,
&:focus,
&:active:focus,
&:active,
&.active {
all: unset;
.btn-mixin();
}
all: unset;
.btn-mixin();
&.disabled, &:disabled, &[disabled=disabled] {
opacity: 0.6;
cursor: not-allowed;
}
}
.btn.btn-link {
color: @brand-primary;
box-shadow: none;
border-color: transparent;
position: initial;
cursor: pointer;
&:hover, &:active, .active, &:focus, &:focus:active {
text-decoration: underline;
border-color: transparent;
box-shadow: none;
color: @brand-primary;
&.disabled, &:disabled, &[disabled=disabled] {
text-decoration: none;
cursor: not-allowed;
}
}
}

// Remember to use some other type of focus indicator when outline is removed.
// Without a focus indicator it will not comply with accessability standards.
button:focus {outline:0 !important;}

/*
Storlekar
Expand Down Expand Up @@ -117,55 +49,6 @@ Markup:
Styleguide 7.1.2
*/

.button-colors(@color, @textColor) {
box-shadow: inset 0 0 2em 0em rgba(0, 0, 0, 0);
background-color: @color;
color: @textColor;
border-color: darken(@color, 15%);
&.disabled, &:disabled, &[disabled=disabled] {
background-color: @color;
border-color: darken(@color, 15%);
&:hover {
background-color: @color;
}
}
&:active:hover {
background-color: @color;
color: @textColor;
}
&:focus {
border-color: darken(@color, 15%);
color: @textColor;
}
&:hover {
background-color: @color;
color: @textColor;
border-color: darken(@color, 50%);
}
&:focus, &:focus:active, &:active, .active, .open {
background-color: @color;
color: @textColor;
}
}

.btn-default {
.button-colors(#e6e6e6, #000);
}
.btn-primary {
.button-colors(@brand-primary, #000);
}
.btn-info {
.button-colors(@brand-info, #000);
}
.btn-success {
.button-colors(@brand-success, #000);
}
.btn-warning {
.button-colors(@brand-warning, #000);
}
.btn-danger {
.button-colors(@brand-danger, #000);
}

/*
Dropdown-menyer
Expand Down
2 changes: 1 addition & 1 deletion custom/colors.less
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ a { color: #337ab7; }
@brand-primary: @happy-blue;
@brand-info: @btn-blue;
@brand-success: @btn-green;
@brand-warning: @btn-yellow;
@brand-warning: @happy-orange;
@brand-danger: @btn-red;
@brand-link: @happy-blue;

Expand Down
4 changes: 2 additions & 2 deletions dist/css/kb-style.css

Large diffs are not rendered by default.

117 changes: 0 additions & 117 deletions dist/less/buttons.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,74 +16,6 @@ Texten på en knapp ska vara kort och beskriva handlingen som knappen utför.
Styleguide 7.1
*/

.btn-mixin() {
box-shadow: inset 0 0 2em 0em rgba(0, 0, 0, 0);
border-radius: 3px;
font-size: 16px;
font-weight: 400;
padding: 4px 10px;
border-style: solid;
border-width: 1px;
transition: 0.5s ease;
transition-property: color, box-shadow;
&:active, .active, .open {
box-shadow: inset 0 0 2em 0em rgba(0, 0, 0, 0.3);
}
&.btn-lg {
padding: 10px 16px;
font-size: 18px;
border-radius: 5px;
}
&.btn-sm {
padding: 5px 10px;
font-size: 12px;
border-radius: 2px;
}
&.btn-xs {
padding: 1px 5px;
font-size: 12px;
border-radius: 2px;
}
}

.btn, button {
&:hover,
&:focus,
&:active:focus,
&:active,
&.active {
all: unset;
.btn-mixin();
}
all: unset;
.btn-mixin();
&.disabled, &:disabled, &[disabled=disabled] {
opacity: 0.6;
cursor: not-allowed;
}
}
.btn.btn-link {
color: @brand-primary;
box-shadow: none;
border-color: transparent;
position: initial;
cursor: pointer;
&:hover, &:active, .active, &:focus, &:focus:active {
text-decoration: underline;
border-color: transparent;
box-shadow: none;
color: @brand-primary;
&.disabled, &:disabled, &[disabled=disabled] {
text-decoration: none;
cursor: not-allowed;
}
}
}

// Remember to use some other type of focus indicator when outline is removed.
// Without a focus indicator it will not comply with accessability standards.
button:focus {outline:0 !important;}

/*
Storlekar
Expand Down Expand Up @@ -117,55 +49,6 @@ Markup:
Styleguide 7.1.2
*/

.button-colors(@color, @textColor) {
box-shadow: inset 0 0 2em 0em rgba(0, 0, 0, 0);
background-color: @color;
color: @textColor;
border-color: darken(@color, 15%);
&.disabled, &:disabled, &[disabled=disabled] {
background-color: @color;
border-color: darken(@color, 15%);
&:hover {
background-color: @color;
}
}
&:active:hover {
background-color: @color;
color: @textColor;
}
&:focus {
border-color: darken(@color, 15%);
color: @textColor;
}
&:hover {
background-color: @color;
color: @textColor;
border-color: darken(@color, 50%);
}
&:focus, &:focus:active, &:active, .active, .open {
background-color: @color;
color: @textColor;
}
}

.btn-default {
.button-colors(#e6e6e6, #000);
}
.btn-primary {
.button-colors(@brand-primary, #000);
}
.btn-info {
.button-colors(@brand-info, #000);
}
.btn-success {
.button-colors(@brand-success, #000);
}
.btn-warning {
.button-colors(@brand-warning, #000);
}
.btn-danger {
.button-colors(@brand-danger, #000);
}

/*
Dropdown-menyer
Expand Down
2 changes: 1 addition & 1 deletion dist/less/colors.less
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ a { color: #337ab7; }
@brand-primary: @happy-blue;
@brand-info: @btn-blue;
@brand-success: @btn-green;
@brand-warning: @btn-yellow;
@brand-warning: @happy-orange;
@brand-danger: @btn-red;
@brand-link: @happy-blue;

Expand Down
2 changes: 1 addition & 1 deletion dist/less/kb-style.less
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
kungbib-styles 1.2.3
kungbib-styles 1.2.4
Stylesheets and assets for use in development at the National Library of Sweden
https://github.com/kungbib/frontend-guide/
*/
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kungbib-styles",
"version": "1.2.3",
"version": "1.2.4",
"description": "Stylesheets and assets for use in development at the National Library of Sweden",
"keywords": [
"kungbib",
Expand Down

0 comments on commit 788d7b1

Please sign in to comment.