Skip to content

Commit

Permalink
feat: provide styling for action buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
inikolova authored and joneff committed Jul 30, 2020
1 parent fe4f8ad commit d852003
Show file tree
Hide file tree
Showing 9 changed files with 345 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/bootstrap/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1697,6 +1697,7 @@ $actions-text: null !default;
$actions-border: null !default;
$actions-gradient: null !default;

$actions-stretched-border: $base-border !default;

// Toolbar

Expand Down
2 changes: 2 additions & 0 deletions packages/default/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1704,6 +1704,8 @@ $actions-text: null !default;
$actions-border: null !default;
$actions-gradient: null !default;

$actions-stretched-border: $base-border !default;


// Toolbar

Expand Down
54 changes: 54 additions & 0 deletions packages/default/scss/action-buttons/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,58 @@
margin-top: $actions-margin-top;
}

.k-actions {
justify-content: flex-start;

.k-button {
flex: 0 1 auto;
}

&.k-actions-start {
justify-content: flex-start;
}

&.k-actions-center {
justify-content: center;
}

&.k-actions-end {
justify-content: flex-end;
}

&.k-actions-stretched {
padding: 0;
align-items: stretch;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
border-width: 1px 0 0;
border-style: solid;
display: flex;
flex-direction: row;
flex-shrink: 0;
flex-basis: auto;
overflow: hidden;

.k-button {
background-clip: border-box;
border-radius: 0;
padding: 12px 16px;
border-width: 0;
text-overflow: ellipsis;
flex: 1 0 0%;
flex-grow: 1;
display: inline-block;
overflow: hidden;

width: auto !important; // sass-lint:disable-line no-important
max-width: 100%;

~ .k-button {
margin: 0;
border-left-width: 1px;
}
}
}
}

}
3 changes: 3 additions & 0 deletions packages/default/scss/action-buttons/_theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@
);
}

.k-actions-stretched {
border-color: $actions-stretched-border;
}
}
20 changes: 20 additions & 0 deletions packages/default/scss/datetime/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,16 @@
}
}

.k-actions {
&.k-actions-start,
&.k-actions-center,
&.k-actions-end {
.k-button {
flex: 0 1 auto;
}
}
}

.k-rtl &,
&.k-rtl,
[dir="rtl"] &,
Expand Down Expand Up @@ -316,6 +326,16 @@
flex: 1 1 50%;
}
}

.k-actions {
&.k-actions-start,
&.k-actions-center,
&.k-actions-end {
.k-button {
flex: 0 1 auto;
}
}
}
}


Expand Down
20 changes: 20 additions & 0 deletions packages/default/scss/grid/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1191,6 +1191,16 @@
flex: 1 1 50%;
}
}

.k-actions {
&.k-actions-start,
&.k-actions-center,
&.k-actions-end {
.k-button {
flex: 0 1 auto;
}
}
}
}

.k-multicheck-wrap {
Expand Down Expand Up @@ -1288,6 +1298,16 @@
flex: 1 1 50%;
}
}

.k-actions {
&.k-actions-start,
&.k-actions-center,
&.k-actions-end {
.k-button {
flex: 0 1 auto;
}
}
}
}

.k-column-menu {
Expand Down
9 changes: 9 additions & 0 deletions packages/default/scss/spreadsheet/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,15 @@
}
}

.k-actions {
&.k-actions-start,
&.k-actions-center,
&.k-actions-end {
.k-button {
flex: 0 1 auto;
}
}
}
}

}
Expand Down
2 changes: 2 additions & 0 deletions packages/material/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1747,6 +1747,8 @@ $actions-text: null !default;
$actions-border: null !default;
$actions-gradient: null !default;

$actions-stretched-border: $base-border !default;


// Toolbar

Expand Down
Loading

0 comments on commit d852003

Please sign in to comment.