Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

Commit

Permalink
Merge pull request #12 from Tynarus/global-stylesheet
Browse files Browse the repository at this point in the history
Global stylesheet
  • Loading branch information
Tynarus committed Sep 12, 2017
2 parents 3c0c3b4 + 492cbcd commit 915848b
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 18 deletions.
8 changes: 6 additions & 2 deletions config/build/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ module.exports = {
},
{
test: /\.scss$/,
exclude: /node_modules/,
use: [ 'raw-loader', 'css-loader', 'sass-loader' ]
exclude: [ /node_modules/, helpers.root('src', 'global.scss') ],
use: [ 'raw-loader', 'sass-loader' ]
},
{
test: helpers.root('src', 'global.scss'),
use: [ 'style-loader', 'css-loader', 'sass-loader' ]
},
{
test: /\.(png|jpe?g|gif|svg|woff|woff2|otf|ttf|eot|ico)$/,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"raw-loader": "^0.5.1",
"reflect-metadata": "^0.1.10",
"sass-loader": "^6.0.6",
"style-loader": "^0.13.1",
"style-loader": "^0.18.2",
"tslint": "~5.7.0",
"typescript": "~2.5.2",
"webpack": "~3.4.1",
Expand Down
2 changes: 2 additions & 0 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<div class="tyn-app">
<h1>App!</h1>

<main>
<router-outlet></router-outlet>
</main>
Expand Down
13 changes: 2 additions & 11 deletions src/app/app.component.scss
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
@import "../constants";

html, body, h1 {
margin: 0;
padding: 0;
}

body {
background-color: $primary-bg;
color: #ffffff;
font-family: $primary-font;
font-size: $primary-font-size;
padding: 20px;
h1 {
color: purple;
}
5 changes: 2 additions & 3 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { Component, OnInit, ViewEncapsulation } from "@angular/core";
import { Component, OnInit } from "@angular/core";

@Component({
selector: "tyn-app",
templateUrl: './app.component.html',
styleUrls: [ "./app.component.scss" ],
encapsulation: ViewEncapsulation.None
styleUrls: [ "./app.component.scss" ]
})
export class AppComponent implements OnInit {

Expand Down
2 changes: 1 addition & 1 deletion src/constants.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
$primary-color: #0064ff;
$primary-color-light: #3f86ff;

$primary-bg: #373737;
$primary-bg: #ffffff;
$primary-content-bg: #4b4b4b;

$primary-font: Tahoma, Arial, sans-serif;
Expand Down
12 changes: 12 additions & 0 deletions src/global.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* Global Application Styles
*/

@import "constants";

body {
background-color: $primary-bg;
color: $primary-color;
font-family: $primary-font;
font-size: $primary-font-size;
}

0 comments on commit 915848b

Please sign in to comment.