uwt-web/src/uwt-web/common/uwt-button.less
2025-10-27 20:04:28 -04:00

86 lines
1.6 KiB
Plaintext

// @ButtonSelector: 'a.uwt-button, button, input[type=button], input[type=submit], input[type=reset], div.uwt-button > a';
// (~'@{ButtonSelector}')
.uwt-button /* , button, input[type=button], input[type=submit], input[type=reset], div.uwt-button > a */
{
display: inline-block;
font-weight: 400;
text-align: center;
text-decoration: none;
vertical-align: middle;
.user-select(none);
background-color: var(--uwt-color-background);
border: 1px solid var(--uwt-color-border);
color: var(--uwt-color-foreground);
padding: .438rem 1.125rem;
font-size: .894rem;
line-height: 1.54;
min-width: 80px;
&+ .uwt-button
{
margin-left: 6px;
}
&:hover
{
--uwt-color-background: #cdd0d2;
--uwt-color-border: #c1c4c6;
text-decoration: none;
}
}
div.uwt-button-group
{
//(~'@{ButtonSelector}')
.uwt-button /*, button, input[type=button], input[type=submit], input[type=reset], div.uwt-button > a */
{
margin-right: 0px;
}
}
div.uwt-button
{
display: inline-block;
&> button.uwt-button-dropdownbutton
{
display: none;
}
&.uwt-button-hasdropdown
{
&> button.uwt-button-dropdownbutton
{
padding-left: 8px;
padding-right: 8px;
display: inline-block;
&::before
{
content: "⏷";
display: block;
}
}
&.uwt-button-requiredropdown > input:nth-child(1), &.uwt-button-requiredropdown > a:nth-child(1)
{
display: none;
}
&:not(.uwt-button-requiredropdown)
{
/* split dropdown button styles */
&> input:first-child
{
border-right: none;
}
&> input.uwt-button-dropdownbutton
{
border-left: none;
}
}
}
}