-
-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Centralize and use global spacing variables
This commit improves UI consistency. It also improves maintainability by removing "magic values" in favor of standardized spacing throughout the application. - Adjust spacing variables to match the convention. - Add `_spacing.scss` to define a centralized set of spacing variables, both absolute and relative, to standardize the spacing throughout the application. This new approach ensures a consistent spacing logic across all components and layouts, facilitating easier maintenance and scalability of the styling codebase. - Update various SCSS styles to utilize the new spacing variables. This change harmonizes the spacing across different parts of the application, aligning with the new design system's principles. - Slightly adjust existing padding/margin/gaps for better consistency. Other supporting changes per component: - RatingCircle: Update style names to match convention, use `v-bind` instead of hacky way to inject circle width value. - TheFooter: Add small gap when footer items wrap. - HiearchicalTreeNode: Refactor variables to separate caret size clearly from padding applied. - App: Make padding responsive as initial behavior of v0.13.0 before 5d940b5. - HorizontalResizeSlider: - Use `v-bind` instead of hacky way to inject SCSS values through variables. - Remove `verticalMargin` property to simplify its styling. - Move `src/presentation/assets/styles/components/_card.scss` closer to components that it styles. Update structure documentation. --- TODO: Search margin, margin-left, margin-right, margin-top, margin-bottom, padding, padding-left, padding-right, padding-top, padding-bottom, gap, column-gap, row-gap, em;, rem;,px; 5M The centralization of spacing definitions will aid in future design adjustments, ensuring that updates to spacing can be made swiftly and uniformly across the application. It's a step towards a more maintainable and scalable frontend architecture.
- Loading branch information
1 parent
0e6a556
commit aa3bef9
Showing
37 changed files
with
208 additions
and
175 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,16 @@ | ||
// Use for fixed-size elements where consistent spacing is important | ||
// regardless of context. | ||
$spacing-absolute-xx-small: 3px; | ||
$spacing-absolute-x-small : 4px; | ||
$spacing-absolute-small : 6px; | ||
$spacing-absolute-medium : 10px; | ||
$spacing-absolute-large : 15px; | ||
$spacing-absolute-x-large : 20px; // TODO: Only used once | ||
$spacing-absolute-xx-large: 30px; | ||
|
||
// Use for elements with text content where spacing should | ||
// scale with text size. | ||
$spacing-relative-x-small : 0.25em; | ||
$spacing-relative-small : 0.5em; | ||
$spacing-relative-medium : 1em; | ||
$spacing-relative-large : 2em; |
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 was deleted.
Oops, something went wrong.
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
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.