Skip to content

Commit

Permalink
Updated abstracts and utilities files
Browse files Browse the repository at this point in the history
  • Loading branch information
dostonnabotov committed Nov 25, 2024
1 parent 3254c25 commit db36a78
Show file tree
Hide file tree
Showing 18 changed files with 87 additions and 37 deletions.
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,54 @@ This is a template for a Sass project. Built with [Vite](https://vitejs.dev/).

![Landing Page](/public/landing-page.png)

## How to use it

1. Just download the `sass` folder
2. Include it in your project.
3. Start using Sass Template

## Folder structure

```bash
sass/
├── abstracts/
│ ├── _colors.scss # Placeholder for color variables
│ ├── _mixins.scss # Placeholder for SCSS mixins
│ ├── _type.scss # Placeholder for typography styles
│ ├── ... # Etc
│ ├── _index.scss # Imports for abstracts
├── base/
│ ├── _global.scss # Global styles for the project
│ ├── _reset.scss # CSS reset styles
│ ├── _root.scss # Root-level variables and custom properties
│ ├── ... # Etc
│ ├── _index.scss # Imports for base styles
├── components/
│ ├── _buttons.scss # Styles for buttons
│ ├── _card.scss # Styles for card components
│ ├── _navbar.scss # Styles for navigation bar
│ ├── ... # Etc
│ ├── _index.scss # Imports for components
├── layouts/
│ ├── _header.scss # Header layout styles
│ ├── _footer.scss # Footer layout styles
│ ├── _grid.scss # Grid layout styles
│ ├── ... # Etc
│ ├── _index.scss # Imports for layouts
├── pages/
│ ├── _home.scss # Home page-specific styles
│ ├── _about.scss # About page-specific styles
│ ├── _contact.scss # Contact page-specific styles
│ ├── ... # Etc
│ ├── _index.scss # Imports for pages
├── utilities/
│ ├── _helpers.scss # Utility classes and helpers
│ ├── _shame.scss # Temporary fixes or overrides
│ ├── ... # Etc
│ ├── _index.scss # Imports for utilities
style.scss # Main entry point for SCSS
```

If you want to clone the whole project, run the following:

- `npm install` - it will install all dependencies
Expand Down
7 changes: 0 additions & 7 deletions sass/abstracts/_colors.scss

This file was deleted.

3 changes: 3 additions & 0 deletions sass/abstracts/_functions.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@function rem($px) {
@return $px / 16 * 1rem;
}
5 changes: 3 additions & 2 deletions sass/abstracts/_index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@forward "varibles";
@forward "mixins";
@forward "colors";
@forward "type";
@forward "functions";
@forward "placeholders";
5 changes: 5 additions & 0 deletions sass/abstracts/_placeholders.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
%btn {
display: inline-flex;
align-items: center;
gap: 0.5em;
}
9 changes: 6 additions & 3 deletions sass/abstracts/_type.scss → sass/abstracts/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
$font-families: (
"primary": sans-serif,
"secondary": serif,
$colors: (
"text": #eee,
"background": #1e232c,
"primary": #2f343d,
"secondary": #404a5a,
"accent": #00f3f3,
);

/**
Expand Down
6 changes: 6 additions & 0 deletions sass/base/_reset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ body {
margin: 0;
}

input,
button,
textarea {
font: inherit;
}

img,
picture {
max-width: 100%;
Expand Down
5 changes: 1 addition & 4 deletions sass/components/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@
}

.button {
display: inline-flex;
align-items: center;
gap: 0.5em;
@extend %btn;
padding: 0.75em 1.5em;
font: inherit;
color: var(--clr-text);
text-decoration: none;
background-color: var(--clr-primary);
Expand Down
Empty file added sass/components/_card.scss
Empty file.
2 changes: 1 addition & 1 deletion sass/layouts/_index.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@forward "home";
@forward "grid";
@forward "main";
5 changes: 0 additions & 5 deletions sass/layouts/_main.scss

This file was deleted.

5 changes: 5 additions & 0 deletions sass/pages/_home.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
main {
display: grid;
gap: 1.5rem;
justify-items: center;
}
6 changes: 2 additions & 4 deletions sass/style.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
@use "base";
@use "components";
@use "layouts";
@use "pages";
@use "layouts";
@use "components";
@use "utilities";

@use "shame";
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/// Screen reader only
/// @see https://gist.github.com/ffoodd/000b59f431e3e64e4ce1a24d5bb36034
.sr-only {
border: 0 !important;
Expand Down
8 changes: 0 additions & 8 deletions sass/utilities/_container.scss

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
.container {
width: 100%;
max-width: 70rem;
margin-inline: auto;
padding-inline: 2rem;
}

.main-title {
font-size: var(--fs-900);
margin-block: 0;
Expand Down
6 changes: 3 additions & 3 deletions sass/utilities/_index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@forward "container";
@forward "typography";
@forward "sr-only";
@forward "helpers";
@forward "accessibility";
@forward "shame";
File renamed without changes.

0 comments on commit db36a78

Please sign in to comment.