|
111 | 111 | } |
112 | 112 |
|
113 | 113 | .ListItem { |
114 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
| 114 | + // stylelint-disable-next-line -- include focus-ring mixin to prevent jump in content for first focused element |
115 | 115 | @include focus-ring($border-width: -1px); |
116 | 116 |
|
117 | 117 | .ListItem + & { |
|
120 | 120 | @include item-separator; |
121 | 121 | } |
122 | 122 |
|
123 | | - &:not(.hasBulkActions):not(.selectMode) { |
124 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
125 | | - &::after { |
126 | | - border-radius: var(--p-border-radius-05); |
127 | | - } |
| 123 | + &.focused { |
| 124 | + // stylelint-disable-next-line -- remove focus-ring mixin to use outline styles |
| 125 | + @include no-focus-ring; |
| 126 | + outline: var(--p-border-width-2) solid |
| 127 | + var(--p-color-border-interactive-focus); |
| 128 | + outline-offset: calc(-1 * var(--p-space-05)); |
| 129 | + // stylelint-disable-next-line -- custom property |
| 130 | + z-index: var(--pc-resource-item-clickable-stacking-order); |
| 131 | + border-radius: var(--p-border-radius-0-experimental); |
128 | 132 |
|
129 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
130 | | - &:last-of-type { |
131 | | - border-bottom-left-radius: var(--p-border-radius-2); |
132 | | - border-bottom-right-radius: var(--p-border-radius-2); |
133 | | - // stylelint-disable selector-max-specificity -- Needed due to the nesting of the elements that change border-radius based on selection mode |
134 | | - .ItemWrapper { |
135 | | - border-radius: inherit; |
| 133 | + @media #{$p-breakpoints-sm-up} { |
| 134 | + border-radius: var(--p-border-radius-3); |
| 135 | + |
| 136 | + &:first-of-type { |
| 137 | + border-bottom-left-radius: var(--p-border-radius-0-experimental); |
| 138 | + border-bottom-right-radius: var(--p-border-radius-0-experimental); |
136 | 139 | } |
137 | 140 |
|
138 | | - &.focused::after { |
139 | | - border-bottom-left-radius: var(--p-border-radius-2); |
140 | | - border-bottom-right-radius: var(--p-border-radius-2); |
| 141 | + &:last-of-type { |
| 142 | + border-top-left-radius: var(--p-border-radius-0-experimental); |
| 143 | + border-top-right-radius: var(--p-border-radius-0-experimental); |
141 | 144 | } |
142 | | - // stylelint-enable |
143 | 145 | } |
144 | | - } |
145 | 146 |
|
146 | | - &.focused { |
147 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
148 | | - @include focus-ring($style: 'focused'); |
149 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
150 | | - z-index: var(--pc-resource-item-clickable-stacking-order); |
151 | | - } |
| 147 | + &:only-child { |
| 148 | + border-radius: var(--p-border-radius-0-experimental); |
| 149 | + |
| 150 | + @media #{$p-breakpoints-sm-up} { |
| 151 | + border-radius: var(--p-border-radius-3); |
| 152 | + } |
| 153 | + } |
152 | 154 |
|
153 | | - // stylelint-disable-next-line selector-max-specificity, selector-max-combinators -- generated by polaris-migrator DO NOT COPY |
154 | | - * + ul > &:first-of-type.focused::after { |
155 | | - top: 1px; |
| 155 | + // stylelint-disable-next-line selector-max-class -- override border radius for selectable items |
| 156 | + &.selectable { |
| 157 | + border-radius: var(--p-border-radius-0-experimental); |
| 158 | + |
| 159 | + @media #{$p-breakpoints-sm-up} { |
| 160 | + // stylelint-disable-next-line -- override border radius for last selectable item to match ResourceList border radius |
| 161 | + &:last-child { |
| 162 | + border-bottom-left-radius: var(--p-border-radius-3); |
| 163 | + border-bottom-right-radius: var(--p-border-radius-3); |
| 164 | + } |
| 165 | + } |
| 166 | + } |
156 | 167 | } |
157 | 168 | } |
0 commit comments