Skip to content
Snippets Groups Projects
Commit 1ad65347 authored by Bernard Roland (Student Com20)'s avatar Bernard Roland (Student Com20)
Browse files

Switched to sass modules

parent cc8bb391
No related branches found
No related tags found
1 merge request!2WIP: Using react
import React from 'react'; import React from 'react';
import { render, screen } from '@testing-library/react'; import { render, screen } from '@testing-library/react';
import App from './components/App'; import App from './index';
test('renders learn react link', () => { test('app renders `Home`', () => {
render(<App />); render(<App />);
const linkElement = screen.getByText(/Hello world!/i); const linkElement = screen.getByText(/Home/i);
expect(linkElement).toBeInTheDocument(); expect(linkElement).toBeInTheDocument();
}); });
@import 'settings.scss';
@use 'scss/settings';
html { html {
scroll-behavior: smooth; scroll-behavior: smooth;
} }
body { body {
color: $body-color; color: settings.$body-color;
} }
\ No newline at end of file
...@@ -5,7 +5,7 @@ import { BrowserRouter as Router, Switch, Route } from 'react-router-dom'; ...@@ -5,7 +5,7 @@ import { BrowserRouter as Router, Switch, Route } from 'react-router-dom';
import Home from 'components/pages/Home'; import Home from 'components/pages/Home';
import './app.scss'; import './app.scss';
function App() { export default function App() {
return ( return (
<Router> <Router>
<Switch> <Switch>
...@@ -15,5 +15,3 @@ function App() { ...@@ -15,5 +15,3 @@ function App() {
); );
} }
export default App;
function Home() {
export default function Home() {
return ( return (
<div> <div>
Home Home
</div> </div>
); );
} }
export default Home;
@function toRem($px) { @function toRem($px) {
@return ($px / 16px)+0rem; @return ($px / 16px)+0rem;
} }
...@@ -14,3 +15,4 @@ ...@@ -14,3 +15,4 @@
@function hoverify($color) { @function hoverify($color) {
@return scale-color($color, $lightness: +5%, $hue: +5%); @return scale-color($color, $lightness: +5%, $hue: +5%);
} }
@import 'functions.scss';
@import 'settings.scss'; @use 'functions';
@use 'settings';
@mixin breakpoint($bp) { @mixin breakpoint($bp) {
@media screen and (min-width: getFrom($breakpoints, $bp)) { @media screen and (min-width: functions.getFrom(settings.$breakpoints, $bp)) {
@content; @content;
} }
} }
//COLORS
// Colors
$primary: #AC42FF; $primary: #AC42FF;
$secondary: #F15154; $secondary: #F15154;
$accent: #7DEFFF; $accent: #7DEFFF;
...@@ -20,7 +21,7 @@ $radial-gradient: radial-gradient(100% 115% at 0% 0%, $primary 0%, $secondary 10 ...@@ -20,7 +21,7 @@ $radial-gradient: radial-gradient(100% 115% at 0% 0%, $primary 0%, $secondary 10
$body-color: #4B4B4B; $body-color: #4B4B4B;
//TYPOGRAPHY // Typography
$weight-light: 300; $weight-light: 300;
$weight-regular: 400; $weight-regular: 400;
$weight-medium: 500; $weight-medium: 500;
...@@ -28,10 +29,11 @@ $weight-semi-bold: 600; ...@@ -28,10 +29,11 @@ $weight-semi-bold: 600;
$weight-bold: 700; $weight-bold: 700;
//Breakpoints // Breakpoints
$breakpoints: ( $breakpoints: (
'small': 360px, 'small': 360px,
'medium': 820px, 'medium': 820px,
'large': 1280px, 'large': 1280px,
'xlarge': 1420px 'xlarge': 1420px
); );
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment