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
fix: toolbar button not having any margin #2196
Conversation
Deploy preview for fundamental-styles ready! Built with commit 963c277 |
src/toolbar.scss
Outdated
@@ -163,6 +163,16 @@ $title-toolbar-height: 2.75rem; | |||
margin: 0.375rem 0.1875rem; | |||
width: auto; | |||
background-color: var(--sapToolbar_SeparatorColor); | |||
&+ .#{$fd-namespace}-button { |
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.
including fd-button inside fd-toolbar is violating the self-contained rules. If inside your component (in this case fd-toolbar) you are overwriting the properties of another component (fd-button in this case) you can't target directly the element like you did, you need a modifier class.
Basically you will need something like: fd-toolbar__button
where you will modify the specific property of fd-button
. But the problem here is that the visual specs do not specify spacing for the buttons in the overflow menu. The button is supposed to have "touchable area" that is bigger than the dimensions of the button and this touchable area is playing the role of "margin" around the button
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.
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.
@InnaAtanasova I think it may be safe to assume the same spacing as buttons in the action sheet menu?
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.
including fd-button inside fd-toolbar is violating the self-contained rules. If inside your component (in this case fd-toolbar) you are overwriting the properties of another component (fd-button in this case) you can't target directly the element like you did, you need a modifier class.
we can apply the same spacing for all elements in the menu, that way we should remove some of classes like
.#{$block}__overflow__label {
&.#{$fd-namespace}-label {
margin: 0.375rem 0;
@itmilos you prob need to update the storyshot, the builds are failing |
3b9af1d
to
963c277
Compare
Related Issue
Closes #1155
Description
Added margins for buttons in toolbar overflow
Screenshots
Before:
After:
Please check whether the PR fulfills the following requirements
rem
fd-*
class is used in the filefd-rtl
,fd-ellipsis
,fd-flex
,fd-selected
,fd-focus
, ect.)fd-reset()
mixin is applied to all elementsnormalize
optionunnormalize
option[ci visual]
so it can trigger chromatic visual regression (e.g.test: run chromatic visual regression [ci visual]
)