yousoph commented on code in PR #42266:
URL: https://github.com/apache/superset/pull/42266#discussion_r3634369338


##########
superset-frontend/src/filters/components/common.ts:
##########
@@ -25,6 +25,22 @@ export const RESPONSIVE_WIDTH = 0;
 export const FilterPluginStyle = styled.div<PluginFilterStylesProps>`
   min-height: ${({ height }) => height}px;
   width: ${({ width }) => (width === RESPONSIVE_WIDTH ? '100%' : 
`${width}px`)};
+  /* Input / InputNumber filter value controls resolve text-align by */
+  /* inheritance, so pin them to the inline start to keep the caret and typed 
*/
+  /* text at the left edge. */

Review Comment:
   Reword to avoid the physical-"left" framing (RTL-correct) and cover all 
three value controls:
   
   ```suggestion
     /* Filter value controls (Input / InputNumber / Select search) resolve */
     /* 'text-align' by inheritance, so pin them to the inline start to keep 
the */
     /* caret and typed text at the inline-start edge. */
   ```



##########
superset-frontend/src/filters/components/common.ts:
##########
@@ -25,6 +25,22 @@ export const RESPONSIVE_WIDTH = 0;
 export const FilterPluginStyle = styled.div<PluginFilterStylesProps>`
   min-height: ${({ height }) => height}px;
   width: ${({ width }) => (width === RESPONSIVE_WIDTH ? '100%' : 
`${width}px`)};
+  /* Input / InputNumber filter value controls resolve text-align by */
+  /* inheritance, so pin them to the inline start to keep the caret and typed 
*/
+  /* text at the left edge. */
+  text-align: start;
+
+  /* antd v6 sets 'text-align: center' directly on '.ant-select-content' for */
+  /* multiple-mode Selects (its selector '.ant-select-multiple */
+  /* .ant-select-content' has specificity 0,2,0). The Select search input */
+  /* lives inside '.ant-select-content' and inherits that value, so the caret 
*/
+  /* and typed text render centered. A value inherited from this wrapper */
+  /* cannot beat a rule that targets '.ant-select-content' directly, so */
+  /* override the element itself: this wrapper class plus the two antd classes 
*/
+  /* give specificity 0,3,0, which wins without !important. RTL-safe. */

Review Comment:
   Stock antd 6.0.0–6.5.1 doesn't set `text-align: center` on 
`.ant-select-content` (only on `.ant-select-clear`), so this rewording drops 
the inaccurate "antd v6 sets…" claim while keeping the specificity reasoning, 
which is correct:
   
   ```suggestion
     /* Some deployments (custom themes / css-in-js overrides) can leak a 
centered */
     /* 'text-align' onto '.ant-select-content'. The Select search <input> 
lives */
     /* inside '.ant-select-content' and resolves 'text-align' by inheritance, 
so */
     /* that would center the caret and typed text. Overriding 
'.ant-select-content' */
     /* directly (this wrapper class + two antd classes = specificity 0,3,0) 
beats */
     /* both an inherited value and a '.ant-select-multiple 
.ant-select-content' */
     /* rule without '!important'. 'start' is the CSS default, so this is a 
no-op */
     /* unless a centered value leaked in, and it's RTL-safe. */
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to