-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
130 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
title: Layout | ||
position: 1 | ||
--- | ||
|
||
# Layout System | ||
|
||
The `baka-material-you` Layout System implements the Material You Design System layout. It creates a design principles that help you create responsive layouts in your web application. | ||
|
||
## Usage | ||
|
||
```scss | ||
@use "baka-material-you" as material-you; | ||
|
||
.my-element { | ||
width: 100%; | ||
|
||
@media screen and (min-width: map-get(map-get(material-you.$layout, sm), "screen")) { | ||
max-width: 400px; | ||
} | ||
|
||
@media screen and (min-width: map-get(map-get(material-you.$layout, md), "screen")) { | ||
width: calc(400px / map-get(map-get(material-you.$layout, md), "columns")); | ||
} | ||
} | ||
``` | ||
|
||
## Custom Layout | ||
|
||
You can create a custom layout by passing a custom `layout` variable. | ||
|
||
```scss | ||
$custom-layout: ( | ||
xxx-large: ( | ||
screen: 1920px, | ||
width: 1600px, | ||
columns: 16, | ||
gutter: 32px, | ||
margin: 48px, | ||
regions: ( | ||
left: ( | ||
width: 380px, | ||
), | ||
), | ||
), | ||
); | ||
|
||
@use "baka-material-you" as material-you with ( | ||
$layout: $custom-layout | ||
); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
title: Overview | ||
position: 0 | ||
--- | ||
|
||
# Material You Design System | ||
|
||
The `baka-material-you` package provides a set of `sass` mixins and variables for styling your application, the main ones being: | ||
|
||
- `styles` - A mixin that applies all of the Material You Design System styles. | ||
- `design--styles` - A mixin that applies only css variables for the corresponding theme. | ||
- `component--styles` - A mixin that applies only styles for the components. | ||
|
||
```scss | ||
@use "baka-material-you" as material-you; | ||
|
||
body { | ||
@include material-you.styles(); | ||
} | ||
``` | ||
|
||
or alternatively: | ||
|
||
```scss | ||
@use "baka-material-you" as material-you; | ||
|
||
@include material-you.component--styles(); | ||
|
||
:root { | ||
@include material-you.design-styles(); | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters