maptool icon indicating copy to clipboard operation
maptool copied to clipboard

[Bug]: Missing HTML5 themed CSS elements

Open Pmofmalasia opened this issue 1 year ago • 2 comments

Describe the Bug

Some input types do not conform to theme using the new mt-theme.css file. So far, I have noted that the following still use the default theme:

  • checkbox
  • number
  • select
  • textarea
  • button

Additionally, the submit input type is difficult to distinguish the button portion from the background.

As an example, this is a comparison between the Preferences window and an HTML5 dialog.

To Reproduce

Make an HTML5 dialog/frame using the listed input types, then add the mt-theme css file. Open frame.

Expected Behaviour

Frame follows theme.

Screenshots

No response

MapTool Info

1.14.3

Desktop

Windows 10

Additional Context

No response

Pmofmalasia avatar Dec 11 '23 02:12 Pmofmalasia

Links misbehaving. Here are the images image image

bubblobill avatar Dec 13 '23 06:12 bubblobill

Had a look, the nascent mt-theme.css has very limited support for input types at this point.

p,
table,
input {
  vertical-align: middle;
  font-size: 1rem;
}

/* Button */
button,
input[type=submit],
.mt-button {
  cursor: default;
  position: relative;
  background: transparent;
  color: var(--mt-theme-color-button-foreground);
  padding: .2em .5em;
  margin: 0;
  font-family: inherit;
  font-size: 1em;
  border-radius: .15em;
  border: none;
}

button::after,
.mt-button::after {
  position: absolute;
  display: block;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding 1px;
  content: "";
  border-radius: .15em;
  background: linear-gradient(
    var(--mt-theme-color-button-start-background),
    var(--mt-theme-color-button-end-background)
  );
  z-index: -1;
}

The number of component fields in FlatLaF is pretty overwhelming but largely matches CSS. Most components have none to all of: border, foreground, and background colours, border widths, and margins for:

  • active,
  • focus,
  • inactive,
  • hover, and
  • pressed states.

They may also have their own insets (padding), arc (border-radius), and component specific characteristics as well.

It would make life easier if you could create a stylesheet with the desired stylable elements and attributes as something to build on.

bubblobill avatar Dec 13 '23 07:12 bubblobill