oficiodesign / initial-css

MIT License
4 stars 1 forks source link

dialog component #108

Open robsonsobral opened 2 years ago

robsonsobral commented 2 years ago

We need a <dialog> component.

I guess it's first draft can be something like:

@use '../abstracts' as my;

dialog {
  position: fixed;
  top: 50%;
  z-index: my.layer('default');

  background-color: my.palette('white');
  border: 0;

  transform: translate(0, -50%);

  &::backdrop {

  }

  + .backdrop {

  }
}

And the selector dialog[tabindex] should be flagged as error.

robsonsobral commented 2 years ago

Do not forget to add [role="dialog"], which however should have [tabindex="-1"].

39