-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Rem converter]: Support for different base font-sizes #196
Merged
Merged
Changes from 8 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
98347c6
Introducing fudis rem multiplier
MayaMarjut 35cbffc
Fixed transform style
MayaMarjut 8f526db
Fix tranform in guidance
MayaMarjut 29cf7a0
Introduce rem converter
MayaMarjut 1f4b36f
Fix spacing tests
MayaMarjut e1ad55f
Updated spacing and setup Fudis documentation
MayaMarjut 2203899
Add changeRemBase function to app
MayaMarjut bd83f39
Merge branch 'main' into DS-212-Foundations-tuki-rem-arvoille
MayaMarjut df7b5ff
Merge branch 'main' into DS-212-Foundations-tuki-rem-arvoille
MayaMarjut e4fd47a
Remove app style scss
MayaMarjut 7caeaf7
Merge branch 'main' into DS-212-Foundations-tuki-rem-arvoille
MayaMarjut 8a8dd30
Removed style reference
MayaMarjut f05b33e
Add rem converter to grid-utils tests
MayaMarjut File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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 |
---|---|---|
|
@@ -62,8 +62,9 @@ import { NgxFudisModule } from 'ngx-fudis'; | |
}) | ||
``` | ||
|
||
#### 5. Define Application's Primary Colors as CSS Variables in Project Root Style | ||
#### 5. Define Application's Root Styles | ||
|
||
##### Define Primary Colors as CSS Variables in Project Root Style | ||
``` | ||
:root { | ||
--fudis-color-primary-light: #hex; | ||
|
@@ -72,6 +73,27 @@ import { NgxFudisModule } from 'ngx-fudis'; | |
--fudis-color-primary-extra-dark: #hex; | ||
} | ||
``` | ||
##### Define Application's REM base CSS Variables in Project Root Style | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. --> Set Rem Base Value |
||
|
||
By default Fudis rem values follow 8 pixel base values, when having default browser CSS font-size of 100%, 1 rem equals 2 * 8px = 16px. | ||
To apply this to your application, add to the root CSS style file: | ||
|
||
``` | ||
:root { | ||
--fudis-rem-multiplier: 1; | ||
} | ||
``` | ||
If application uses other rem base value by setting font-size to e. g. 62.5% . Adjust -fudis-rem-multiplier accordingly. | ||
|
||
``` | ||
html { | ||
font-size: 62.5%; // this sets 1rem to equal 10px | ||
} | ||
|
||
:root { | ||
--fudis-rem-multiplier: 0.625; | ||
} | ||
``` | ||
|
||
#### 6. Include Fudis Foundation SCSS-field | ||
|
||
|
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,9 @@ | ||
/* These rem multiplier styles are essential for executing karma tests */ | ||
|
||
html { | ||
font-size: 62.5%; | ||
} | ||
|
||
:root { | ||
--fudis-rem-multiplier: 0.625; | ||
} |
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
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
12 changes: 6 additions & 6 deletions
12
ngx-fudis/projects/ngx-fudis/src/lib/foundations/grid/tokens.scss
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--> Set Primary Colors