Skip to content

Commit

Permalink
Fix border-radius regression/lapse
Browse files Browse the repository at this point in the history
- have to use border and not box-shadow/padding for `overflow: hidden` to work correctly

- I think I missed this/f'd this up in the amsterdam overrides
  • Loading branch information
cee-chen committed Aug 13, 2024
1 parent f2d8e9f commit 4216c21
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 16 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
mathWithUnits,
} from '../../../global_styling';

import { euiFormControlDefaultShadow, euiFormVariables } from '../form.styles';
import { euiFormVariables } from '../form.styles';

export const euiFormControlLayoutStyles = (euiThemeContext: UseEuiTheme) => {
const { euiTheme } = euiThemeContext;
Expand Down Expand Up @@ -45,14 +45,9 @@ export const euiFormControlLayoutStyles = (euiThemeContext: UseEuiTheme) => {
display: flex;
align-items: stretch;
/* Account for inner box-shadow style border */
padding: ${euiTheme.border.width.thin};
${euiFormControlDefaultShadow(euiThemeContext, {
withBackground: false,
})}
border: ${euiTheme.border.width.thin} solid ${form.borderColor};
background-color: ${form.backgroundColor};
/* Keep backgrounds inside border radius */
overflow: hidden;
overflow: hidden; /* Keep backgrounds inside border radius */
/* Force the stretch of any children so they expand the full height of the control */
> * {
Expand Down Expand Up @@ -144,14 +139,8 @@ export const euiFormControlLayoutSideNodeStyles = (
${logicalCSS('padding-right', euiTheme.size.s)}
}
`,
append: css`
${logicalCSS('border-top-right-radius', 'inherit')}
${logicalCSS('border-bottom-right-radius', 'inherit')}
`,
prepend: css`
${logicalCSS('border-top-left-radius', 'inherit')}
${logicalCSS('border-bottom-left-radius', 'inherit')}
`,
append: css``,
prepend: css``,
uncompressed: `
${text} {
${logicalCSS('padding-horizontal', euiTheme.size.xs)}
Expand Down

0 comments on commit 4216c21

Please sign in to comment.