Skip to content

Commit

Permalink
#6: dark fixes, select2 fixes, JS file for Site UI
Browse files Browse the repository at this point in the history
  • Loading branch information
robinpoort committed Jun 15, 2018
1 parent cc21277 commit ec22a9a
Show file tree
Hide file tree
Showing 12 changed files with 89 additions and 41 deletions.
4 changes: 4 additions & 0 deletions dist/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -12829,6 +12829,10 @@ img.mfp-img {
max-width: 100% !important;
}

.select2-dropdown {
color: #222222;
}

/* Datepicker
========================================================================== */
.datepicker {
Expand Down
2 changes: 1 addition & 1 deletion dist/css/admin.min.css

Large diffs are not rendered by default.

13 changes: 9 additions & 4 deletions dist/css/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -3538,11 +3538,11 @@
padding-bottom: 0.25em;
}

.k-ui-namespace .k-list__item .k-title {
.k-ui-namespace .k-list__item .k-title.k-title {
margin: 0;
}

.k-ui-namespace .k-list__item .k-subtitle {
.k-ui-namespace .k-list__item .k-subtitle.k-subtitle {
padding: 0;
margin-bottom: 0;
border: none;
Expand Down Expand Up @@ -3969,8 +3969,9 @@
.k-ui-namespace .k-subtitle {
font-size: small;
/* 1 */
padding-bottom: 0em;
padding-bottom: 0.33em;
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
margin-top: 0;
margin-bottom: 1em;
}

Expand All @@ -3979,7 +3980,7 @@
}

.k-ui-namespace .k-title + .k-subtitle {
margin-top: 0em;
margin-top: -1em;
/* 2 */
}

Expand Down Expand Up @@ -5456,6 +5457,10 @@ img.mfp-img {
max-width: 100% !important;
}

.select2-dropdown {
color: #222222;
}

/* Datepicker
========================================================================== */
.datepicker {
Expand Down
2 changes: 1 addition & 1 deletion dist/css/site.min.css

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions dist/js/k-site-ui-initialize.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
var kodekitUI = {}; // global variable

// Run initialize code
(function () {

// Add js-enabled class to html element
var el = document.documentElement;
var cl = "k-js-enabled";
if (el.classList) {
el.classList.add(cl);
} else {
el.className += " " + cl;
}

})();
1 change: 1 addition & 0 deletions dist/js/k-site-ui-initialize.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,9 @@ module.exports = function(grunt) {
],
'<%= distPath %>/js/kui-initialize.js': [
'<%= srcPath %>/js/ui.initialize.js'
],
'<%= distPath %>/js/k-site-ui-initialize.js': [
'<%= srcPath %>/js/site.ui.initialize.js'
]
}
}
Expand Down
15 changes: 15 additions & 0 deletions src/js/site.ui.initialize.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
var kodekitUI = {}; // global variable

// Run initialize code
(function () {

// Add js-enabled class to html element
var el = document.documentElement;
var cl = "k-js-enabled";
if (el.classList) {
el.classList.add(cl);
} else {
el.className += " " + cl;
}

})();
4 changes: 4 additions & 0 deletions src/scss/shared/3rdparty/_select2.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@
width: 100%!important;
max-width: 100%!important;
}

.select2-dropdown {
color: $k-type-color;
}
}
4 changes: 2 additions & 2 deletions src/scss/site/molecules/_list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
padding-top: $k-site-list-item-padding;
padding-bottom: $k-site-list-item-padding;

.k-title {
.k-title.k-title {
margin: 0;
}

.k-subtitle {
.k-subtitle.k-subtitle {
padding: 0;
margin-bottom: 0;
border: none;
Expand Down
3 changes: 2 additions & 1 deletion src/scss/site/molecules/_title.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@
font-size: $k-site-subtitle-font-size; /* 1 */
padding-bottom: $k-site-subtitle-padding;
border-bottom: $k-site-subtitle-border-bottom;
margin-top: 0;
@include content-block($k-site-subtitle-margin);
}

.k-title + .k-subtitle {
margin-top: -($k-site-subtitle-padding); /* 2 */
margin-top: -($k-site-title-spacing); /* 2 */
}


Expand Down
64 changes: 32 additions & 32 deletions src/scss/site/tools/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -307,58 +307,58 @@ $k-site-thumbnail-dark-hover-border-color: rgba(255, 255, 255, 0.3) !
// Title
// ==========================================================================

$k-site-title-spacing: round($k-site-section-spacing / 2) !default;
$k-site-title-spacing: 1em !default;

$k-site-subtitle-font-size: small !default;
$k-site-subtitle-padding: round($k-site-section-spacing * 0.25) !default;
$k-site-subtitle-margin: $k-site-section-spacing !default;
$k-site-subtitle-border-bottom: $k-site-border-width $k-site-border-style rgba(0, 0, 0, 0.1) !default;
$k-site-subtitle-font-size: small !default;
$k-site-subtitle-padding: $k-site-section-spacing * 0.33 !default; // Don't round
$k-site-subtitle-margin: $k-site-section-spacing !default;
$k-site-subtitle-border-bottom: $k-site-border-width $k-site-border-style rgba(0, 0, 0, 0.1) !default;

// Dark theme
$k-site-subtitle-dark-border-bottom: $k-site-border-width $k-site-border-style rgba(255, 255, 255, 0.1) !default;
$k-site-subtitle-dark-border-bottom: $k-site-border-width $k-site-border-style rgba(255, 255, 255, 0.1) !default;


// Toglr
// ==========================================================================

// Repo overrides
$toglr-id: '#search-open' !default;
$toglr-js-class: '.k-js-enabled' !default;
$toglr-breakpoint: false !default;
$toglr-visually-hidden: false !default;
$toglr-id: '#search-open' !default;
$toglr-js-class: '.k-js-enabled' !default;
$toglr-breakpoint: false !default;
$toglr-visually-hidden: false !default;

$toglr-input-selector: '.k-toglr-input' !default;
$toglr-input-selector: '.k-toglr-input' !default;

$toglr-nav-selector: '.k-toglr-body' !default;
$toglr-nav-breakpoint-display: false !default;
$toglr-nav-selector: '.k-toglr-body' !default;
$toglr-nav-breakpoint-display: false !default;

$toglr-togglers-selector: '.k-toglr-togglers' !default;
$toglr-label-selector: '.k-toglr-label' !default;
$toglr-label-open-selector: '.k-toglr-label-open' !default;
$toglr-label-close-selector: '.k-toglr-label-close' !default;
$toglr-open-selector: '.k-toglr-open' !default;
$toglr-close-selector: '.k-toglr-close' !default;
$toglr-togglers-selector: '.k-toglr-togglers' !default;
$toglr-label-selector: '.k-toglr-label' !default;
$toglr-label-open-selector: '.k-toglr-label-open' !default;
$toglr-label-close-selector: '.k-toglr-label-close' !default;
$toglr-open-selector: '.k-toglr-open' !default;
$toglr-close-selector: '.k-toglr-close' !default;

// Custom styling
$k-site-toglr-togglers-cursor: pointer !default;
$k-site-toglr-togglers-color: inherit !default;
$k-site-toglr-togglers-text-decoration: none !default;
$k-site-toglr-togglers-hover-text-decoration: underline !default;
$k-site-toglr-togglers-cursor: pointer !default;
$k-site-toglr-togglers-color: inherit !default;
$k-site-toglr-togglers-text-decoration: none !default;
$k-site-toglr-togglers-hover-text-decoration: underline !default;

$k-site-toglr-togglers-before-caret-size: 5px !default;
$k-site-toglr-togglers-before-caret-size: 5px !default;

$k-site-toglr-togglers-after-content: "" !default;
$k-site-toglr-togglers-after-font-size: 16px !default;
$k-site-toglr-togglers-after-content: "" !default;
$k-site-toglr-togglers-after-font-size: 16px !default;


// Toolbar
// ==========================================================================

$k-site-toolbar-margin: $k-site-section-spacing !default;
$k-site-toolbar-padding: $k-site-spacing !default;
$k-site-toolbar-background: rgba(0, 0, 0, 0.05) !default;
$k-site-toolbar-border-bottom: 2px $k-site-border-style rgba(0, 0, 0, 0.1) !default;
$k-site-toolbar-margin: $k-site-section-spacing !default;
$k-site-toolbar-padding: $k-site-spacing !default;
$k-site-toolbar-background: rgba(0, 0, 0, 0.05) !default;
$k-site-toolbar-border-bottom: 2px $k-site-border-style rgba(0, 0, 0, 0.1) !default;

// Dark theme
$k-site-toolbar-dark-background: rgba(255, 255, 255, 0.05) !default;
$k-site-toolbar-dark-border-bottom: 2px $k-site-border-style rgba(255, 255, 255, 0.1) !default;
$k-site-toolbar-dark-background: rgba(255, 255, 255, 0.05) !default;
$k-site-toolbar-dark-border-bottom: 2px $k-site-border-style rgba(255, 255, 255, 0.1) !default;

0 comments on commit ec22a9a

Please sign in to comment.