-
Notifications
You must be signed in to change notification settings - Fork 6
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(script): script info tab overflow #145
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
src/index.css
Outdated
} | ||
|
||
*[role]:focus { | ||
outline: none; | ||
} | ||
|
||
/* stylelint-disable-next-line selector-class-pattern */ | ||
.ant-tabs-tab.ant-tabs-tab-active { |
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.
Is this issue fixed by moving the overridden to the global context?
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.
Is this issue fixed by moving the overridden to the global context?
It may have been fixed using the recommended and more standardized approach by antd, using the TabPane
component.
The class name here is likely due to the original CSS module being converted to a styled-components implementation and not having a suitable place to put it, so it was moved here.
However, it is not quite appropriate to have it here. This is more like a theme customization. I suggest avoiding global theme overrides as much as possible and keeping them limited to encapsulated components, such as within ScriptTab.
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 put this here because I saw other ant style
are defined here or other file as global
.
Maybe I think there should be another PR to refactor these.
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 put this here because I saw other
ant style
are defined here or other file asglobal
.
It was originally .scriptTabs :global { .ant-tabs-tab-active { ... } }
, so it is a local change that should only affect components under .scriptTabs
. It should not be considered as a global change.
Maybe I think there should be another PR to refactor these.
If there are some common theme changes, they can be encapsulated into themed Ant Design components.
However, I'm not sure if this situation occurs frequently enough to warrant it.
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 put this here because I saw other
ant style
are defined here or other file asglobal
.It was originally
.scriptTabs :global { .ant-tabs-tab-active { ... } }
, so it is a local change that should only affect components under.scriptTabs
. It should not be considered as a global change.Maybe I think there should be another PR to refactor these.
If there are some common theme changes, they can be encapsulated into themed Ant Design components.
However, I'm not sure if this situation occurs frequently enough to warrant it.
Not only components under .scriptTabs
changed, I tried it, so I just put them here
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.
Not only components under
.scriptTabs
changed, I tried it, so I just put them here
You can refer to the compiled CSS result.
Source code
.scriptTabs {
display: flex;
flex-direction: column;
justify-content: center;
:global {
.ant-tabs-nav {
&::before {
border-bottom-width: 4px;
}
}
.ant-tabs-nav-list {
padding-left: 40px;
}
.ant-tabs-tab-btn {
color: #333;
font-weight: 400;
font-size: 20px;
line-height: 23px;
margin-bottom: 0;
&[aria-selected='true'] {
font-weight: 500;
}
}
}
}
Build result
.styles_scriptTabs__K3ITv {
display: flex;
flex-direction: column;
justify-content: center;
}
.styles_scriptTabs__K3ITv .ant-tabs-nav::before {
border-bottom-width: 4px;
}
.styles_scriptTabs__K3ITv .ant-tabs-nav-list {
padding-left: 40px;
}
.styles_scriptTabs__K3ITv .ant-tabs-tab-btn {
color: #333;
font-weight: 400;
font-size: 20px;
line-height: 23px;
margin-bottom: 0;
}
.styles_scriptTabs__K3ITv .ant-tabs-tab-btn[aria-selected=true] {
font-weight: 500;
}
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 just put them to the specific components
Does this pr still need to be adjusted? |
Yes |
2023-11-30.10.18.32.mov
These two problems should be abnormal. Need to confirm. |
Is this updated? |
Magickbase/ckb-explorer-public-issues#450