Welcome! Please hold on...

0 %
Kashif Sohail
Sr. Frontend Developer
  • Residence:
    Pakistan
  • City:
    Karachi
  • Age:
    26
Magento 1x 2x
Wordpress
Laravel
Angular
React
English
Urdu
  • Bootstrap, Tailwind
  • Sass, Less, Css
  • Webpack
  • GIT knowledge
0

No products in the cart.

The Selectmenu Element Is No More…Long Live Select!

October 10, 2024

[ad_1]

I looked over an older article written for us by Patrick Brosset introduce a then-new suggestion for a more style-conscious cousin . I had fun watching it the boilerplate from Adam’s demo as a first glance:

select {
  &, &::picker(select) {
    appearance: base-select;
  }
  
  &::picker(select) {
    transition: 
      display allow-discrete 1s, 
      opacity 1s, 
      overlay 1s allow-discrete
    ;
  }
  
  &:not(:open)::picker(select) {
    opacity: 0;
  }
  
  &:open::picker(select) {
    opacity: 1;
    
    @starting-style {
      opacity: 0;
    }
  }
}

I see that ::picker(select) That’s the trigger for everything. Taking a quick look at Una’s post, I see that there are more options to choose something different with additional CSS functionality to select the existing parts instead of continuing with an entirely new element. This is cool because one of Una’s demos shows how we still get the default setting