Skip to content

Commit

Permalink
Merge pull request #158 from kontenta/style-sticky-actions
Browse files Browse the repository at this point in the history
Style sticky actions
  • Loading branch information
erik-epineer authored Mar 5, 2020
2 parents 8f1ba7e + 3de54dd commit aa1572e
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 23 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"require-dev": {
"mockery/mockery": "^1.2",
"orchestra/testbench-dusk": "~3.8.2 || ^4.0.1",
"orchestra/testbench-dusk": "3.8.2 || ^4.0.1",
"squizlabs/php_codesniffer": "^3.3",
"timacdonald/log-fake": "^1.0"
},
Expand Down
2 changes: 1 addition & 1 deletion resources/css/kontour.css

Large diffs are not rendered by default.

24 changes: 15 additions & 9 deletions resources/sass/_layout.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$kontour-hamburger-width: 4rem !default;
$kontour-hamburger-width: 4*$kontour-spacing-base !default;

// Main layout with all major blocks as direct children of the body
body {
Expand All @@ -9,7 +9,7 @@ body {
> * {
flex-grow: 1;
margin-top: 0;
padding: 1rem;
padding: $kontour-spacing-base;
}

> header {
Expand All @@ -21,7 +21,7 @@ body {
> main {
flex-grow: 1000;
flex-basis: 45ch;
min-height: calc(100vh - 10rem);
min-height: calc(100vh - #{10*$kontour-spacing-base});
}

> footer {
Expand Down Expand Up @@ -60,7 +60,7 @@ body {
}

> * {
padding: 0.5rem;
padding: $kontour-spacing-base/2;
}

> :first-child {
Expand Down Expand Up @@ -107,7 +107,7 @@ body {
> * {
flex-grow: 1;
margin-top: 0;
padding: 1rem;
padding: $kontour-spacing-base;
}
}

Expand All @@ -118,16 +118,22 @@ body {
align-items: baseline;
align-content: center;

padding: 0.5rem;
padding: $kontour-spacing-base/2;

> * {
margin: 0.25rem;
padding: 0.25rem;
margin: $kontour-spacing-base/4;
padding: $kontour-spacing-base/4;

text-align: center;
}
}

header[data-kontour-section="kontourToolHeader"] + * {
margin-top: 1rem;
margin-top: $kontour-spacing-base;
}

[data-kontour-section="kontourStickyActions"] {
position: sticky;
top: 0;
bottom: 0;
}
7 changes: 5 additions & 2 deletions resources/sass/_reset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ html {
body {
// Reset all margins
margin: 0;

background-color: $kontour-background-color;
color: $kontour-text-color;
}

* + * {
// Add default space between all adjacent elements
margin-top: 1rem;
margin-top: $kontour-spacing-base;
}

dt,
Expand Down Expand Up @@ -99,7 +102,7 @@ dl > * {

dl > div {
margin-top: 0;
padding-bottom: 1rem;
padding-bottom: $kontour-spacing-base;
}

dt {
Expand Down
31 changes: 23 additions & 8 deletions resources/sass/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
$kontour-success-color: green !default;
$kontour-warning-color: orange !default;
$kontour-error-color: red !default;
$kontour-spacing-base: 1rem !default;

$kontour-text-color: black !default;
$kontour-background-color: white !default;
$kontour-tinted-background-color: mix(
$kontour-text-color,
$kontour-background-color,
5%
) !default;

$kontour-unimposing-color: gray !default;
$kontour-destructive-color: red !default;
$kontour-border-color: transparentize(black, 0.95) !default;
$kontour-tinted-background-color: $kontour-border-color !default;
$kontour-success-color: green !default;
$kontour-warning-color: orange !default;
$kontour-error-color: $kontour-destructive-color !default;

$kontour-border-color: mix(
$kontour-text-color,
$kontour-background-color,
10%
) !default;
$kontour-border: 1px solid $kontour-border-color !default;
$kontour-border-radius: .1em;
$kontour-input-padding: .1em;
$kontour-border-radius: 0.1em;

$kontour-button-color: blue !default;
$kontour-button-active-box-shadow: inset 0 2px 4px transparentize(black, 0.95) !default;
$kontour-button-focus-box-shadow: 0 0 0 .2rem change_color($kontour-button-color, $lightness: 80%) !default;
$kontour-button-focus-box-shadow: 0 0 0 0.2rem
change_color($kontour-button-color, $lightness: 80%) !default;
$kontour-button-focus-outline: none !default;

$kontour-input-padding: 0.1em;
6 changes: 6 additions & 0 deletions resources/sass/kontour.scss
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ body > footer {
}
}

[data-kontour-section="kontourStickyActions"] {
background-color: $kontour-tinted-background-color;
color: $kontour-text-color;
padding: $kontour-spacing-base;
}

@import "layout";
@import "utilities";
@import "forms";
Expand Down
4 changes: 2 additions & 2 deletions resources/sass/widgets/_crumbtrail.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

* + li::before {
content: "\2192";
padding-left: 0.5rem;
padding-right: 0.5rem;
padding-left: $kontour-spacing-base/2;
padding-right: $kontour-spacing-base/2;
}
}

0 comments on commit aa1572e

Please sign in to comment.