Skip to content
Snippets Groups Projects
Unverified Commit ddf95b28 authored by Mauko Quiroga's avatar Mauko Quiroga
Browse files

Fix CSS

parent b1633a8e
No related branches found
No related tags found
No related merge requests found
const path = require("path")
const glob = require("glob")
const withSass = require("@zeit/next-sass")
module.exports = {
webpack: (config) => {
config.module.rules.push(
{
test: /\.(css|scss)/,
loader: "emit-file-loader",
options: {
name: "dist/[path][name].[ext]",
},
}
,
{
test: /\.css$/,
use: ["babel-loader", "raw-loader", "postcss-loader"],
}
,
{
test: /\.s(a|c)ss$/,
use: ["babel-loader", "raw-loader", "postcss-loader",
{
loader: "sass-loader",
options: {
includePaths: ["styles", "node_modules"]
.map((d) => path.join(__dirname, d))
.map((g) => glob.sync(g))
.reduce((a, c) => a.concat(c), []),
},
},
],
}
)
return config
},
module.exports = withSass({
exportPathMap() {
return {
"/": { page: "/" },
}
},
distDir: "build",
}
})
......@@ -13,6 +13,7 @@ import {
import Typography from "@material-ui/core/Typography"
import { withStyles } from "@material-ui/core/styles/"
import withRoot from "../lib/withRoot"
import "../styles/index.scss"
const Plot = dynamic(import("../components/Plot"), {
ssr: false,
......@@ -30,6 +31,9 @@ const styles = theme => ({
margin: "1em auto",
width: "25em",
},
dorine: {
background: "red",
},
})
class Index extends React.Component {
......@@ -62,7 +66,7 @@ class Index extends React.Component {
return (
<Fragment>
<Head><title>LexImpact</title></Head>
<div className={classes.root}>
<div className={`${classes.root} dorine`}>
<Dialog open={open} onClose={this.handleClose}>
<DialogTitle>Combien ça coûte ?</DialogTitle>
<DialogContent>
......@@ -75,6 +79,9 @@ class Index extends React.Component {
<Typography variant="h1" gutterBottom>LexImpact</Typography>
<Plot />
<Button variant="contained" color="secondary" onClick={this.handleClick}>Calculer</Button>
<div className={classes.dorine}>
asdsadf
</div>
</div>
</Fragment>
)
......
module.exports = {
plugins: [
require("postcss-easy-import")({ prefix: "_" }),
require("autoprefixer")({ /* ...options */ }),
],
}
@import 'normalize.css';
$primary-color: grey;
$primary-color: black;
.heading {
display: flex;
justify-content: center;
font-size: 20px;
font-weight: bold;
margin-top: 5em;
}
.text {
display: flex;
justify-content: center;
margin-top: 2em;
}
.img-container {
justify-content: center;
display: flex;
margin-top: 2em;
img {
width: 50px;
height: 50px;
display: flex;
}
.dorine {
background-color: $primary-color;
}
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment