mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) New Grist Forms styling and field options
Summary: - New styling for forms. - New field options for various field types (spinner, checkbox, radio buttons, alignment, sort). - Improved alignment of form fields in columns. - Support for additional select input keyboard shortcuts (Enter and Backspace). - Prevent submitting form on Enter if an input has focus. - Fix for changing form field type causing the field to disappear. Test Plan: Browser tests. Reviewers: jarek Reviewed By: jarek Differential Revision: https://phab.getgrist.com/D4223
This commit is contained in:
@@ -23,6 +23,7 @@ export const cssLabel = styled('label', `
|
||||
display: inline-flex;
|
||||
min-width: 0px;
|
||||
margin-bottom: 0px;
|
||||
flex-shrink: 0;
|
||||
|
||||
outline: none;
|
||||
user-select: none;
|
||||
|
||||
25
app/client/ui2018/radio.ts
Normal file
25
app/client/ui2018/radio.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import {theme} from 'app/client/ui2018/cssVars';
|
||||
import {styled} from 'grainjs';
|
||||
|
||||
export const cssRadioInput = styled('input', `
|
||||
appearance: none;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin: 0px !important;
|
||||
border-radius: 50%;
|
||||
background-clip: content-box;
|
||||
border: 1px solid ${theme.checkboxBorder};
|
||||
background-color: ${theme.checkboxBg};
|
||||
flex-shrink: 0;
|
||||
&:hover {
|
||||
border: 1px solid ${theme.checkboxBorderHover};
|
||||
}
|
||||
&:disabled {
|
||||
background-color: 1px solid ${theme.checkboxDisabledBg};
|
||||
}
|
||||
&:checked {
|
||||
padding: 2px;
|
||||
background-color: ${theme.controlPrimaryBg};
|
||||
border: 1px solid ${theme.controlPrimaryBg};
|
||||
}
|
||||
`);
|
||||
Reference in New Issue
Block a user