diff --git a/base.css b/base.css index b49b579..dd3d378 100644 --- a/base.css +++ b/base.css @@ -29,6 +29,7 @@ textarea, input { font-size: var(--default-font-size); font: inherit; color: currentColor; + border-radius: 0.20em; /* Slightly round the edges */ } .flex { @@ -63,6 +64,17 @@ footer { border: var(--default-border-style); } +*:disabled, input:disabled { + /* + Note: The pointerenter and pointerleave events are fired when a pointing device is moved into an element or + one of its descendants. So, even if pointer-events: none is set on the parent and not set on children, + the events are triggered on the parent after the pointer is moved in or out of a descendant. + + Source: https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events + */ + pointer-events: none; +} + /* Override default OS provided checkboxes and radio buttons */ /* === CHECKBOX === */ @@ -74,9 +86,6 @@ input[type="checkbox"]:checked::before, input[type="radio"]:checked::before { transform: scale(1); } -input[type="checkbox"]:disabled, input[type="radio"]:disabled { - cursor: not-allowed; -} /* TODO: These controls should probably have their sizes relative to their parent, so "em" instead of "rem" */ /* Set the size and properties of the box that represents the checkbox */ input[type=checkbox] { @@ -85,7 +94,6 @@ input[type=checkbox] { width: 1.15rem; height: 1.15rem; border: var(--default-border-style); - border-radius: 0.15em; /* Slightly round the edges */ /* Set the control to grid so the :before element is centered in the box, assuming the button is checked */ display: grid; place-content: center; @@ -116,7 +124,7 @@ input[type=checkbox]::before { /* === BEGIN RADIO BUTTON === */ /* Set the size and properties of the circle that represents the radio button */ input[type=radio] { - appearance: none; /* Hide the defualt OS provided control */ + appearance: none; /* Hide the default OS provided control */ margin: 0; /* Not removed by appearance */ width: 1.65rem; height: 1.65rem; diff --git a/low-contrast.css b/low-contrast.css index 1362b3c..d99f7e3 100644 --- a/low-contrast.css +++ b/low-contrast.css @@ -18,19 +18,31 @@ body { color: var(--main-font-color); } +h1, h2, h3, h4, h5, h6 { + color:maroon; +} + +fieldset > legend { + color: darkblue; +} + textarea, input { - background-color: #a6a6a6; + background-color: var(--main-bg-color); color: var(--main-font-color); } -input[type="radio"], input[type="checkbox"] { +input[type="radio"], input[type="checkbox"], input, textarea { border: var(--border-style); } -input[type="radio"]:focus, input[type="checkbox"]:focus { +input[type="radio"]:focus, input[type="checkbox"]:focus, input:focus, textarea:focus { border: var(--border-focus-style); } +input[type="button"]:focus { + border: var(--border-style); +} + /* Color the check mark in the checkbox */ input[type=checkbox]::before { /* Using shadow-box instead of background-color will enable the state of the radio button to be visible when printed. */ @@ -44,9 +56,11 @@ input[type="radio"]::before { box-shadow: inset 1rem 1rem var(--main-font-color); } -/*On button press / hold*/ +/* On button press / hold */ input[type="button"]:active { - border: 3px solid var(--alt-bg-color); + border: var(--border-style); + color: var(--main-bg-color); + background-color: var(--main-font-color); } ::placeholder { diff --git a/test.html b/test.html index 377f118..ee44c58 100644 --- a/test.html +++ b/test.html @@ -49,57 +49,66 @@ Elementum sagittis vitae et leo duis ut diam quam nulla. Pharetra sit amet aliquam id diam maecenas ultricies mi. Donec et odio pellentesque diam volutpat commodo. Interdum consectetur libero id faucibus nisl tincidunt eget. Non nisi est sit amet. Tortor vitae purus faucibus ornare suspendisse sed. Varius morbi enim nunc faucibus a pellentesque sit. Donec massa sapien faucibus et molestie ac feugiat. Varius vel pharetra vel turpis nunc eget lorem. Pellentesque nec nam aliquam sem. Pulvinar mattis nunc sed blandit libero. At auctor urna nunc id cursus metus aliquam eleifend mi. Quam nulla porttitor massa id neque aliquam. Eget duis at tellus at urna condimentum mattis pellentesque id. Pharetra diam sit amet nisl suscipit adipiscing bibendum est.

-
- -

DETAILS: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Enim lobortis scelerisque fermentum dui faucibus in. Sed id semper risus in hendrerit gravida. Ac auctor augue mauris augue neque gravida in.

- - - -
+

Text Input Controls

+
+ Textboxes +
+ + +
+
+
+ Textarea +
+ + +
+
- \ No newline at end of file