Skip to content

Commit

Permalink
feat(picker): add down state
Browse files Browse the repository at this point in the history
Add new down state using "calculated perspective" method, and existing
custom properties that define the width and height.
  • Loading branch information
jawinn committed Apr 29, 2024
1 parent 0812e4d commit 20866aa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/picker/index.css
Expand Up @@ -251,6 +251,11 @@ governing permissions and limitations under the License.
&:active {
background-color: var(--highcontrast-picker-background-color, var(--mod-picker-background-color-active, var(--spectrum-picker-background-color-active)));
border-color: var(--highcontrast-picker-border-color-default, var(--mod-picker-border-active, var(--spectrum-picker-border-color-active)));
transform: perspective(max(
var(--spectrum-downstate-height, var(--mod-picker-block-size, var(--spectrum-picker-block-size))),
var(--spectrum-downstate-width, var(--mod-picker-inline-size, var(--spectrum-picker-inline-size))) * var(--spectrum-component-size-width-ratio-down)
))
translateZ(var(--spectrum-component-size-difference-down));

/* Focus indicator */
&::after {
Expand Down

0 comments on commit 20866aa

Please sign in to comment.