--calcite-input-message-spacing-value
var not inheritable
#10620
Labels
0 - new
New issues that need assignment.
ArcGIS Field Apps
Issues logged by ArcGIS Field Apps team members.
bug
Bug reports for broken functionality. Issues should include a reproduction of the bug.
calcite-components
Issues specific to the @esri/calcite-components package.
design-tokens
Issues requiring design tokens.
estimate - 2
Small fix or update, may require updates to tests.
impact - p2 - want for an upcoming milestone
User set priority impact status of p2 - want for an upcoming milestone
p - medium
Issue is non core or affecting less that 60% of people using the library
Milestone
Check existing issues
Actual Behavior
<calcite-input-message>
elements retain their default top margin if--calcite-input-message-spacing-value
is not set directly on the element, but rather on an ancestor element.Expected Behavior
<calcite-input-message>
elements assume the top margin as set by--calcite-input-message-spacing-value
regardless if the var is set directly or on an ancestor element.Reproduction Sample
https://codepen.io/nwhittaker-esri/pen/KKOZKYx
Reproduction Steps
--calcite-input-message-spacing-value
is set directly on the input-message element.Reproduction Version
2.13.1
Relevant Info
Minimally preferring the
var()
function's fallback value should work well here:calcite-design-system/packages/calcite-components/src/components/input-message/input-message.scss
Lines 11 to 12 in 6704555
Possibly worth auditing other components to make sure their CSS vars are inheritable.
Regression?
No response
Priority impact
impact - p2 - want for an upcoming milestone
Impact
Impact is towards dev productivity and maintainability. The expectation is that CSS is inherently cascading. When that doesn't happen, it's unexpected and takes time to debug. Maintenance-wise, given a collection of elements that should be treated uniformly, it's a better practice to set common styles/vars on a shared ancestor rather than every leaf element.
Calcite package
Esri team
ArcGIS Field Apps
The text was updated successfully, but these errors were encountered: