-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add global sections settings #891
Changes from all commits
528ea67
f22e290
64f7b65
c8ee32b
dba5e0c
0700783
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -355,6 +355,51 @@ | |
} | ||
] | ||
}, | ||
{ | ||
"name": "Sections", | ||
"settings": [ | ||
{ | ||
"type": "range", | ||
"id": "sections_spacing", | ||
"min": 0, | ||
"max": 80, | ||
"step": 4, | ||
"unit": "px", | ||
"label": "Vertical spacing between sections", | ||
"default": 40 | ||
}, | ||
{ | ||
"type": "range", | ||
"id": "sections_border_opacity", | ||
"min": 0, | ||
"max": 100, | ||
"step": 5, | ||
"unit": "%", | ||
"label": "Border opacity", | ||
"default": 50 | ||
}, | ||
{ | ||
"type": "range", | ||
"id": "sections_border_width", | ||
"min": 0, | ||
"max": 10, | ||
"step": 1, | ||
"unit": "px", | ||
"label": "Border thickness", | ||
"default": 0 | ||
}, | ||
{ | ||
"type": "range", | ||
"id": "sections_radius", | ||
"min": 0, | ||
"max": 30, | ||
"step": 3, | ||
"unit": "px", | ||
"label": "Corner radius", | ||
"default": 0 | ||
} | ||
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. I know we arent requesting translations yet, but what do you think of already adding the content to the 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. This section still has questions around it and is sure to change. I think it's best to minimize the files touched until we're closer to nailing it down. |
||
] | ||
}, | ||
{ | ||
"name": "Media", | ||
"settings": [ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,14 +83,22 @@ | |
--page-width: {{ settings.page_width | divided_by: 10 }}rem; | ||
--page-width-margin: {% if settings.page_width == '1600' %}2{% else %}0{% endif %}rem; | ||
|
||
--sections-spacing: {{ settings.sections_spacing }}px; | ||
--sections-safe-spacing: {% if settings.sections_spacing < 15 %}15{% else %}{{settings.sections_spacing}}{% endif %}px; | ||
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. curious as this was named 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. This is a concept to prevent this issue. Some sections can bump up against each other with 0px spacing, but others (ones with headings like this) should always have some spacing (tbd). I want to take time to align how sections/headings are applying margins so this could become less necessary. |
||
--sections-padding: 20px; | ||
--sections-radius: {{ settings.sections_radius }}px; | ||
--sections-border-width: {{ settings.sections_border_width }}px; | ||
--sections-border-opacity: {{ settings.sections_border_opacity | divided_by: 100.0 }}; | ||
--sections-border-color: {{ settings.sections_border_color.red }}, {{ settings.sections_border_color.green }}, {{ settings.sections_border_color.blue }}; | ||
|
||
--popup-drawer-border-width: {{ settings.popup_drawer_border_width }}px; | ||
--popup-drawer-border-opacity: {{ settings.popup_drawer_border_opacity | divided_by: 100.0 }}; | ||
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. We will need to re-visit everywhere where we have negative margin For instance in collage:
this is happening: https://screenshot.click/16-36-6uzmu-j7ykj.png 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. I tried to fix the collage case so we can see that that use case better. But again the code involved here really needs to be cleaned up once the direction is settled on. |
||
--popup-drawer-corner-radius: {{ settings.popup_drawer_corner_radius }}px; | ||
--popup-drawer-shadow-opacity: {{ settings.popup_drawer_shadow_opacity | divided_by: 100.0 }}; | ||
--popup-drawer-shadow-horizontal-offset: {{ settings.popup_drawer_shadow_horizontal_offset }}px; | ||
--popup-drawer-shadow-vertical-offset: {{ settings.popup_drawer_shadow_vertical_offset }}px; | ||
--popup-drawer-shadow-blur-radius: {{ settings.popup_drawer_blur_radius }}px; | ||
|
||
{% comment %} Grid styles {% endcomment %} | ||
--grid-desktop-vertical-spacing: {{ settings.grid_desktop_vertical_spacing | divided_by: 10.0 }}rem; | ||
--grid-desktop-horizontal-spacing: {{ settings.grid_desktop_horizontal_spacing | divided_by: 10.0 }}rem; | ||
|
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.
I think well need to re-visit everywhere where we were calculating the vertical spacing like
in base.css
Or where we add negative margin.
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.
Don't quite know what to do with the background secondary cases yet. Will need to follow up with design after merge.