mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-11 19:42:54 +08:00
fix: Table miss border-raidus in Firefox (#16957)
* Revert "Merge pull request #16174 from ant-design/fix-table-chrome" This reverts commit686c1fc346
, reversing changes made to924afc2706
. * firefox only * add comment
This commit is contained in:
parent
e873cd33af
commit
3547887e75
@ -32,175 +32,170 @@
|
|||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-thead > tr {
|
&-thead > tr > th {
|
||||||
// For Chrome extra space:
|
color: @table-header-color;
|
||||||
// - https://github.com/ant-design/ant-design/issues/14926
|
font-weight: 500;
|
||||||
// - https://github.com/ant-design/ant-design/issues/16131
|
text-align: left;
|
||||||
background: @table-header-bg;
|
background: @table-header-bg;
|
||||||
|
border-bottom: @border-width-base @border-style-base @border-color-split;
|
||||||
|
transition: background 0.3s ease;
|
||||||
|
|
||||||
> th {
|
&[colspan] {
|
||||||
color: @table-header-color;
|
text-align: center;
|
||||||
font-weight: 500;
|
}
|
||||||
text-align: left;
|
|
||||||
background: transparent;
|
|
||||||
border-bottom: @border-width-base @border-style-base @border-color-split;
|
|
||||||
transition: background 0.3s ease;
|
|
||||||
|
|
||||||
&[colspan] {
|
.@{iconfont-css-prefix}-filter,
|
||||||
text-align: center;
|
.@{table-prefix-cls}-filter-icon {
|
||||||
}
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
width: 28px;
|
||||||
|
height: 100%;
|
||||||
|
color: @table-header-icon-color;
|
||||||
|
font-size: @font-size-sm;
|
||||||
|
text-align: center;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.3s;
|
||||||
|
|
||||||
.@{iconfont-css-prefix}-filter,
|
> svg {
|
||||||
.@{table-prefix-cls}-filter-icon {
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 50%;
|
||||||
right: 0;
|
left: 50%;
|
||||||
width: 28px;
|
margin-top: -@font-size-sm / 2 + 1px;
|
||||||
height: 100%;
|
margin-left: -@font-size-sm / 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.@{table-prefix-cls}-filter-selected.@{iconfont-css-prefix}-filter {
|
||||||
|
color: @primary-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.@{table-prefix-cls}-column-sorter {
|
||||||
|
display: table-cell;
|
||||||
|
vertical-align: middle;
|
||||||
|
|
||||||
|
.@{table-prefix-cls}-column-sorter-inner {
|
||||||
|
height: 1em;
|
||||||
|
margin-top: 0.35em;
|
||||||
|
margin-left: 0.57142857em;
|
||||||
color: @table-header-icon-color;
|
color: @table-header-icon-color;
|
||||||
font-size: @font-size-sm;
|
line-height: 1em;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
cursor: pointer;
|
|
||||||
transition: all 0.3s;
|
transition: all 0.3s;
|
||||||
|
|
||||||
> svg {
|
.@{table-prefix-cls}-column-sorter-up,
|
||||||
position: absolute;
|
.@{table-prefix-cls}-column-sorter-down {
|
||||||
top: 50%;
|
.iconfont-size-under-12px(11px);
|
||||||
left: 50%;
|
|
||||||
margin-top: -@font-size-sm / 2 + 1px;
|
|
||||||
margin-left: -@font-size-sm / 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.@{table-prefix-cls}-filter-selected.@{iconfont-css-prefix}-filter {
|
display: block;
|
||||||
color: @primary-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
.@{table-prefix-cls}-column-sorter {
|
|
||||||
display: table-cell;
|
|
||||||
vertical-align: middle;
|
|
||||||
|
|
||||||
.@{table-prefix-cls}-column-sorter-inner {
|
|
||||||
height: 1em;
|
height: 1em;
|
||||||
margin-top: 0.35em;
|
|
||||||
margin-left: 0.57142857em;
|
|
||||||
color: @table-header-icon-color;
|
|
||||||
line-height: 1em;
|
line-height: 1em;
|
||||||
text-align: center;
|
|
||||||
transition: all 0.3s;
|
transition: all 0.3s;
|
||||||
|
&.on {
|
||||||
|
color: @primary-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&-full {
|
||||||
|
margin-top: -0.15em;
|
||||||
|
|
||||||
.@{table-prefix-cls}-column-sorter-up,
|
.@{table-prefix-cls}-column-sorter-up,
|
||||||
.@{table-prefix-cls}-column-sorter-down {
|
.@{table-prefix-cls}-column-sorter-down {
|
||||||
.iconfont-size-under-12px(11px);
|
height: 0.5em;
|
||||||
|
line-height: 0.5em;
|
||||||
display: block;
|
|
||||||
height: 1em;
|
|
||||||
line-height: 1em;
|
|
||||||
transition: all 0.3s;
|
|
||||||
&.on {
|
|
||||||
color: @primary-color;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&-full {
|
.@{table-prefix-cls}-column-sorter-down {
|
||||||
margin-top: -0.15em;
|
margin-top: 0.125em;
|
||||||
|
|
||||||
.@{table-prefix-cls}-column-sorter-up,
|
|
||||||
.@{table-prefix-cls}-column-sorter-down {
|
|
||||||
height: 0.5em;
|
|
||||||
line-height: 0.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.@{table-prefix-cls}-column-sorter-down {
|
|
||||||
margin-top: 0.125em;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&.@{table-prefix-cls}-column-has-actions {
|
&.@{table-prefix-cls}-column-has-actions {
|
||||||
position: relative;
|
position: relative;
|
||||||
background-clip: padding-box; // For Firefox background bug, https://github.com/ant-design/ant-design/issues/12628
|
background-clip: padding-box; // For Firefox background bug, https://github.com/ant-design/ant-design/issues/12628
|
||||||
|
/* stylelint-disable-next-line */
|
||||||
|
-webkit-background-clip: border-box; // For Chrome extra space: https://github.com/ant-design/ant-design/issues/14926
|
||||||
|
|
||||||
&.@{table-prefix-cls}-column-has-filters {
|
&.@{table-prefix-cls}-column-has-filters {
|
||||||
// https://github.com/ant-design/ant-design/issues/12650
|
// https://github.com/ant-design/ant-design/issues/12650
|
||||||
padding-right: 30px !important;
|
padding-right: 30px !important;
|
||||||
|
|
||||||
|
.@{iconfont-css-prefix}-filter,
|
||||||
|
.@{table-prefix-cls}-filter-icon {
|
||||||
|
&.@{table-prefix-cls}-filter-open {
|
||||||
|
color: @text-color-secondary;
|
||||||
|
background: @table-header-filter-active-bg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Very complicated styles logic but necessary
|
||||||
|
&:hover {
|
||||||
.@{iconfont-css-prefix}-filter,
|
.@{iconfont-css-prefix}-filter,
|
||||||
.@{table-prefix-cls}-filter-icon {
|
.@{table-prefix-cls}-filter-icon {
|
||||||
&.@{table-prefix-cls}-filter-open {
|
&:hover {
|
||||||
color: @text-color-secondary;
|
color: @text-color-secondary;
|
||||||
background: @table-header-filter-active-bg;
|
background: @table-header-filter-active-bg;
|
||||||
}
|
}
|
||||||
}
|
&:active {
|
||||||
// Very complicated styles logic but necessary
|
color: @text-color;
|
||||||
&:hover {
|
|
||||||
.@{iconfont-css-prefix}-filter,
|
|
||||||
.@{table-prefix-cls}-filter-icon {
|
|
||||||
&:hover {
|
|
||||||
color: @text-color-secondary;
|
|
||||||
background: @table-header-filter-active-bg;
|
|
||||||
}
|
|
||||||
&:active {
|
|
||||||
color: @text-color;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.@{table-prefix-cls}-column-has-sorters {
|
|
||||||
cursor: pointer;
|
|
||||||
&:hover {
|
|
||||||
background: @table-header-sort-active-bg;
|
|
||||||
.@{iconfont-css-prefix}-filter,
|
|
||||||
.@{table-prefix-cls}-filter-icon {
|
|
||||||
background: @table-header-sort-active-bg;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&:active {
|
|
||||||
.@{table-prefix-cls}-column-sorter-up:not(.on),
|
|
||||||
.@{table-prefix-cls}-column-sorter-down:not(.on) {
|
|
||||||
color: @text-color-secondary;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.@{table-prefix-cls}-header-column {
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: top;
|
|
||||||
|
|
||||||
.@{table-prefix-cls}-column-sorters {
|
|
||||||
display: table;
|
|
||||||
|
|
||||||
> .@{table-prefix-cls}-column-title {
|
|
||||||
display: table-cell;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
> *:not(.@{table-prefix-cls}-column-sorter) {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
&::before {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
background: transparent;
|
|
||||||
transition: all 0.3s;
|
|
||||||
content: '';
|
|
||||||
}
|
|
||||||
&:hover::before {
|
|
||||||
background: rgba(0, 0, 0, 0.04);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&.@{table-prefix-cls}-column-has-sorters {
|
&.@{table-prefix-cls}-column-has-sorters {
|
||||||
user-select: none;
|
cursor: pointer;
|
||||||
|
&:hover {
|
||||||
|
background: @table-header-sort-active-bg;
|
||||||
|
.@{iconfont-css-prefix}-filter,
|
||||||
|
.@{table-prefix-cls}-filter-icon {
|
||||||
|
background: @table-header-sort-active-bg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&:active {
|
||||||
|
.@{table-prefix-cls}-column-sorter-up:not(.on),
|
||||||
|
.@{table-prefix-cls}-column-sorter-down:not(.on) {
|
||||||
|
color: @text-color-secondary;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.@{table-prefix-cls}-header-column {
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: top;
|
||||||
|
|
||||||
|
.@{table-prefix-cls}-column-sorters {
|
||||||
|
display: table;
|
||||||
|
|
||||||
|
> .@{table-prefix-cls}-column-title {
|
||||||
|
display: table-cell;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
> *:not(.@{table-prefix-cls}-column-sorter) {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
&::before {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
background: transparent;
|
||||||
|
transition: all 0.3s;
|
||||||
|
content: '';
|
||||||
|
}
|
||||||
|
&:hover::before {
|
||||||
|
background: rgba(0, 0, 0, 0.04);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.@{table-prefix-cls}-column-has-sorters {
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&-thead > tr:first-child > th {
|
&-thead > tr:first-child > th {
|
||||||
@ -235,6 +230,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&-thead > tr:hover {
|
||||||
|
background: none;
|
||||||
|
}
|
||||||
|
|
||||||
&-footer {
|
&-footer {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: @table-padding-vertical @table-padding-horizontal;
|
padding: @table-padding-vertical @table-padding-horizontal;
|
||||||
@ -709,4 +708,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Another fix of Firefox:
|
||||||
|
* - https://github.com/ant-design/ant-design/issues/12628
|
||||||
|
* - https://github.com/ant-design/ant-design/issues/12628
|
||||||
|
*/
|
||||||
|
@supports (-moz-appearance: meterbar) {
|
||||||
|
.@{table-prefix-cls}-thead > tr > th.@{table-prefix-cls}-column-has-actions {
|
||||||
|
background-clip: padding-box;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@import './size';
|
@import './size';
|
||||||
|
Loading…
Reference in New Issue
Block a user