mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 17:44:35 +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;
|
||||
}
|
||||
|
||||
&-thead > tr {
|
||||
// For Chrome extra space:
|
||||
// - https://github.com/ant-design/ant-design/issues/14926
|
||||
// - https://github.com/ant-design/ant-design/issues/16131
|
||||
&-thead > tr > th {
|
||||
color: @table-header-color;
|
||||
font-weight: 500;
|
||||
text-align: left;
|
||||
background: @table-header-bg;
|
||||
border-bottom: @border-width-base @border-style-base @border-color-split;
|
||||
transition: background 0.3s ease;
|
||||
|
||||
> th {
|
||||
color: @table-header-color;
|
||||
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] {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&[colspan] {
|
||||
text-align: center;
|
||||
}
|
||||
.@{iconfont-css-prefix}-filter,
|
||||
.@{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,
|
||||
.@{table-prefix-cls}-filter-icon {
|
||||
> svg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 28px;
|
||||
height: 100%;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-top: -@font-size-sm / 2 + 1px;
|
||||
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;
|
||||
font-size: @font-size-sm;
|
||||
line-height: 1em;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s;
|
||||
|
||||
> svg {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-top: -@font-size-sm / 2 + 1px;
|
||||
margin-left: -@font-size-sm / 2;
|
||||
}
|
||||
}
|
||||
.@{table-prefix-cls}-column-sorter-up,
|
||||
.@{table-prefix-cls}-column-sorter-down {
|
||||
.iconfont-size-under-12px(11px);
|
||||
|
||||
.@{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 {
|
||||
display: block;
|
||||
height: 1em;
|
||||
margin-top: 0.35em;
|
||||
margin-left: 0.57142857em;
|
||||
color: @table-header-icon-color;
|
||||
line-height: 1em;
|
||||
text-align: center;
|
||||
transition: all 0.3s;
|
||||
&.on {
|
||||
color: @primary-color;
|
||||
}
|
||||
}
|
||||
|
||||
&-full {
|
||||
margin-top: -0.15em;
|
||||
|
||||
.@{table-prefix-cls}-column-sorter-up,
|
||||
.@{table-prefix-cls}-column-sorter-down {
|
||||
.iconfont-size-under-12px(11px);
|
||||
|
||||
display: block;
|
||||
height: 1em;
|
||||
line-height: 1em;
|
||||
transition: all 0.3s;
|
||||
&.on {
|
||||
color: @primary-color;
|
||||
}
|
||||
height: 0.5em;
|
||||
line-height: 0.5em;
|
||||
}
|
||||
|
||||
&-full {
|
||||
margin-top: -0.15em;
|
||||
|
||||
.@{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-sorter-down {
|
||||
margin-top: 0.125em;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.@{table-prefix-cls}-column-has-actions {
|
||||
position: relative;
|
||||
background-clip: padding-box; // For Firefox background bug, https://github.com/ant-design/ant-design/issues/12628
|
||||
&.@{table-prefix-cls}-column-has-actions {
|
||||
position: relative;
|
||||
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 {
|
||||
// https://github.com/ant-design/ant-design/issues/12650
|
||||
padding-right: 30px !important;
|
||||
&.@{table-prefix-cls}-column-has-filters {
|
||||
// https://github.com/ant-design/ant-design/issues/12650
|
||||
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,
|
||||
.@{table-prefix-cls}-filter-icon {
|
||||
&.@{table-prefix-cls}-filter-open {
|
||||
&:hover {
|
||||
color: @text-color-secondary;
|
||||
background: @table-header-filter-active-bg;
|
||||
}
|
||||
}
|
||||
// Very complicated styles logic but necessary
|
||||
&: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;
|
||||
}
|
||||
&: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 {
|
||||
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 {
|
||||
@ -235,6 +230,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
&-thead > tr:hover {
|
||||
background: none;
|
||||
}
|
||||
|
||||
&-footer {
|
||||
position: relative;
|
||||
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';
|
||||
|
Loading…
Reference in New Issue
Block a user