Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
Fix breakpoint mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
imperavi authored and imperavi committed Jan 26, 2017
1 parent 0653a97 commit 46172a2
Show file tree
Hide file tree
Showing 11 changed files with 54 additions and 15 deletions.
2 changes: 1 addition & 1 deletion dist/css/kube.css
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ a.muted:hover {
.nowrap td {
white-space: nowrap; }

@media (min-width: 1024px) {
@media (min-width: 768px) and (max-width: 1024px) {
.columns-2,
.columns-3,
.columns-4 {
Expand Down
2 changes: 1 addition & 1 deletion dist/css/kube.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/scss/kube.scss
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ $overlay-background-color: rgba(#fff, .95);
}
@else if $min == md
{
@media (min-width: $md) { @content; }
@media (min-width: $sm) and (max-width: $md) { @content; }
}
@else if $min == lg
{
Expand Down
11 changes: 10 additions & 1 deletion src/_js/Core/Kube.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,16 @@ if (typeof jQuery === 'undefined') {throw new Error('Kube\'s requires jQuery')};
;(function()
{
// Inherits
Function.prototype.inherits = function(parent) { for (var key in parent.prototype) { this.prototype[key] = parent.prototype[key]; }};
Function.prototype.inherits = function(parent)
{
var F = function () {};
F.prototype = parent.prototype;
var f = new F();

for (var prop in this.prototype) f[prop] = this.prototype[prop];
this.prototype = f;
this.prototype.super = parent.prototype;
};

// Core Class
var Kube = function(element, options)
Expand Down
14 changes: 7 additions & 7 deletions src/_scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,20 @@ $color-text: #313439 !default;
$color-headings: #0d0d0e !default;

// Links
$color-link: #007eff !default;
$color-link-hover: #ff3366 !default;
$color-link: #3794de !default;
$color-link-hover: #f03c69 !default;

// Button
$color-button-primary: #007eff !default;
$color-button-primary: #1c86f2 !default;
$color-button-primary-text: #fff !default;
$color-button-secondary: #313439 !default;
$color-button-secondary-text: #fff !default;

// States
$color-error: #ff3366 !default;
$color-success: #2ec4b6 !default;
$color-warning: #fdb833 !default;
$color-focus: #007eff !default;
$color-error: #f03c69 !default;
$color-success: #35beb1 !default;
$color-warning: #f7ba45 !default;
$color-focus: #1c86f2 !default;

// Extra
$color-inverted: #fff !default;
Expand Down
6 changes: 3 additions & 3 deletions src/_scss/components/_dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
right: 0;
width: 280px;
color: #000;
font-size: 14px;
font-size: $font-size - 1px;
background: #fff;
box-shadow: 0 10px 25px rgba(0, 0, 0, .15);
border-radius: 8px;
border-radius: 3px;
max-height: 300px;
margin: 0;
padding: 0;
Expand Down Expand Up @@ -43,7 +43,7 @@
}
& a {
display: block;
padding: 8px 8px 7px 8px;
padding: 12px;
text-decoration: none;
color: #000;
&:hover {
Expand Down
9 changes: 9 additions & 0 deletions src/_scss/components/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ textarea {
line-height: $textarea-base-line;
vertical-align: top;
}
input[type="file"] {
width: auto;
border: none;
padding: 0;
height: auto;
background: none;
box-shadow: none;
display: inline-block;
}
input[type="search"],
input.search {
background-repeat: no-repeat;
Expand Down
12 changes: 12 additions & 0 deletions src/_scss/components/_grid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@
.last { order: 1; }

@include breakpoint(sm) {
.row {

& .col {
margin-left: 0;
width: 100%;
}
&.gutters {
& .col {
margin-bottom: $text-margin-bottom;
}
}
}
.first-sm { order: -1; }
.last-sm { order: 1; }
}
2 changes: 1 addition & 1 deletion src/_scss/mixins/_breakpoints.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
@else if $min == md
{
@media (min-width: $md) { @content; }
@media (min-width: $sm) and (max-width: $md) { @content; }
}
@else if $min == lg
{
Expand Down
4 changes: 4 additions & 0 deletions src/_scss/mixins/_flex.scss
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,8 @@
// item width
@mixin flex-item-width($width) {
flex: 0 0 $width;

@include breakpoint(sm) {
flex: 0 0 100% !important;
}
}
5 changes: 5 additions & 0 deletions src/_scss/mixins/_grid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
@include flex;
@include flex-items-row;
@include flex-items-wrap;

@include breakpoint(sm) {
@include flex-items-column;
@include flex-items-nowrap;
}
}

// Generate Columns
Expand Down

0 comments on commit 46172a2

Please sign in to comment.