diff --git a/src/styles/carbon.scss b/src/styles/carbon.scss index 1cfed4c..55c7553 100644 --- a/src/styles/carbon.scss +++ b/src/styles/carbon.scss @@ -213,6 +213,33 @@ body { margin-bottom: 2rem; } +// The invoice form's fields sit on a plain 12-column grid. Carbon's nested gives a column only as wide as the +// outer grid's tracks, which left dates, GSTINs and the saved-client box too narrow to show their text. +.voiced-fields { + display: grid; + grid-template-columns: repeat(12, minmax(0, 1fr)); + gap: 1rem; + align-items: start; +} + +.voiced-field { + grid-column: span 12; + min-width: 0; +} + +@for $n from 1 through 12 { + .voiced-field--#{$n} { + grid-column: span $n; + } +} + +@media (max-width: 1000px) { + // A narrow window: each of the three date/number fields still needs room for its text. + .voiced-field--4 { + grid-column: span 6; + } +} + .voiced-stack > * + * { margin-top: 1.5rem; } diff --git a/src/views/NewInvoice.tsx b/src/views/NewInvoice.tsx index 9469253..41c3bd1 100644 --- a/src/views/NewInvoice.tsx +++ b/src/views/NewInvoice.tsx @@ -800,8 +800,8 @@ export default function NewInvoice({ settings, onSettingsChange, active, onActiv - - +
+
- - +
+
setDueDate(e.target.value)} /> - - +
+
- +
- +
Create client - - +
+
- - +
+