Use Bootstrap variables in styles

This commit is contained in:
Lucas Verney 2016-07-31 12:18:46 +02:00
parent b7ff2bbd85
commit 5a9f540cc0
13 changed files with 48 additions and 36 deletions

File diff suppressed because one or more lines are too long

16
app/dist/index.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
app/dist/style.css vendored

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,8 @@
$rowMarginTop: 30px;
$rowMarginBottom: 10px;
.row { .row {
margin-top: 30px; margin-top: $rowMarginTop;
} }
.art { .art {
@ -22,19 +25,10 @@
float: none; float: none;
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
margin-bottom: 10px; margin-bottom: $rowMarginBottom;
} }
.songs { .songs {
> thead, composes: songs from "./Songs.scss";
> tbody,
> tfoot {
> tr {
> th,
> td {
padding: 5px;
}
}
}
} }
} }

View File

@ -1,5 +1,7 @@
$titleImage-size: $font-size-h1 + 10px;
.titleImage { .titleImage {
height: 46px; height: $titleImage-size;
} }
@media (max-width: 767px) { @media (max-width: 767px) {

View File

@ -6,7 +6,7 @@
> tr { > tr {
> th, > th,
> td { > td {
padding: 5px; padding: $table-condensed-cell-padding;
} }
} }
} }

View File

@ -1,10 +1,12 @@
$marginBottom: 34px;
.filter { .filter {
margin-bottom: 34px; margin-bottom: $marginBottom;
} }
.legend { .legend {
text-align: right; text-align: right;
line-height: 34px; line-height: $marginBottom;
} }
@media (max-width: 767px) { @media (max-width: 767px) {

View File

@ -1,5 +1,8 @@
$marginBottom: 30px;
$artMarginBottom: 10px;
.placeholders { .placeholders {
margin-bottom: 30px; margin-bottom: $marginBottom;
text-align: center; text-align: center;
} }
@ -9,7 +12,7 @@
.art { .art {
display: inline-block; display: inline-block;
margin-bottom: 10px; margin-bottom: $artMarginBottom;
width: 75%; width: 75%;
height: auto; height: auto;

View File

@ -3,6 +3,10 @@ $hoverBackground: #222;
$activeBackground: $hoverBackground; $activeBackground: $hoverBackground;
$foreground: white; $foreground: white;
$lightgrey: #eee; $lightgrey: #eee;
$titleFontSize: $font-size-h1 - 10px;
$titleMarginBottom: 20px;
$mainPadding: 20px;
$condensedNavPadding: 5px;
.sidebar { .sidebar {
position: fixed; position: fixed;
@ -46,12 +50,12 @@ $lightgrey: #eee;
.title { .title {
margin: 0; margin: 0;
margin-bottom: 20px; margin-bottom: $titleMarginBottom;
font-size: 26px; font-size: $titleFontSize;
} }
.imgTitle { .imgTitle {
height: 36px; height: $font-size-h1;
} }
/* Sidebar navigation */ /* Sidebar navigation */
@ -81,7 +85,7 @@ $lightgrey: #eee;
* Main content * Main content
*/ */
.main-panel { .main-panel {
padding: 20px; padding: $mainPadding;
} }
/* /*
@ -103,8 +107,8 @@ $lightgrey: #eee;
.nav { .nav {
li { li {
a { a {
padding-left: 5px; padding-left: $condensedNavPadding;
padding-right: 5px; padding-right: $condensedNavPadding;
} }
} }
} }

View File

@ -0,0 +1,3 @@
// Make variables and mixins available when using CSS modules.
@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_variables";
@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_mixins";

View File

@ -69,6 +69,7 @@
"resolve-url-loader": "^1.6.0", "resolve-url-loader": "^1.6.0",
"rimraf": "^2.5.4", "rimraf": "^2.5.4",
"sass-loader": "^4.0.0", "sass-loader": "^4.0.0",
"sass-resources-loader": "^1.0.2",
"style-loader": "^0.13.1", "style-loader": "^0.13.1",
"stylelint": "^7.0.3", "stylelint": "^7.0.3",
"stylelint-config-standard": "^11.0.0", "stylelint-config-standard": "^11.0.0",

View File

@ -49,7 +49,8 @@ module.exports = {
"style-loader", "style-loader",
"css-loader?modules&importLoaders=1&localIdentName=[name]__[local]__[hash:base64:5]" + "css-loader?modules&importLoaders=1&localIdentName=[name]__[local]__[hash:base64:5]" +
"!postcss-loader" + "!postcss-loader" +
"!sass-loader" "!sass-loader" +
"!sass-resources-loader"
) )
}, },
{ {
@ -81,6 +82,8 @@ module.exports = {
postcss: [autoprefixer({ browsers: browsers }), postcssReporter({ throwError: true, clearMessages: true })], postcss: [autoprefixer({ browsers: browsers }), postcssReporter({ throwError: true, clearMessages: true })],
sassResources: "./app/styles/variables.scss",
resolve: { resolve: {
// Include empty string "" to resolve files by their explicit extension // Include empty string "" to resolve files by their explicit extension
// (e.g. require("./somefile.ext")). // (e.g. require("./somefile.ext")).