Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong CSS built value for col-form-label #3946

Closed
1 task done
giulioz opened this issue Feb 24, 2021 · 3 comments · Fixed by #3947
Closed
1 task done

Wrong CSS built value for col-form-label #3946

giulioz opened this issue Feb 24, 2021 · 3 comments · Fixed by #3947
Assignees
Labels
3.x comp: clay-css Issues related to Clay CSS type: bug Issues reporting that Component is not doing what should be done

Comments

@giulioz
Copy link

giulioz commented Feb 24, 2021

  • I have searched the issues of this repository and believe that this is not a duplicate.

ClayUI complies to a wrong css calc expression for the col-form-label class in padding values, since it uses this variable in the sum, that has four items:

$input-border-width: $input-border-top-width $input-border-right-width

Sum performed here:

padding-bottom: add($input-padding-y, $input-border-width);

As you can see in the compiled lib/css/base.css it compiles to a wrong value:

image

This breaks build using the latest react-scripts:

Creating an optimized production build...
Failed to compile.

Parse error on line 1:
0.375rem + 0.0625rem 0.0625rem ...
---------------------^
Expecting end of input, "RPAREN", "ADD", "SUB", "MUL", "DIV", got unexpected "REMS"
CompileError: Begins at CSS selector undefined

Environment

Tech Version
Clay v3.235.0
React 17.0.0
@giulioz giulioz added the type: bug Issues reporting that Component is not doing what should be done label Feb 24, 2021
@giulioz
Copy link
Author

giulioz commented Feb 24, 2021

A CodeSandbox to reproduce the issue is this, even though to reproduce it you need to download the zip and perform a yarn build

@pat270 pat270 added 3.x comp: clay-css Issues related to Clay CSS labels Feb 24, 2021
pat270 added a commit to pat270/clay that referenced this issue Feb 24, 2021
…-bottom-width` or `$input-border-top-width` to avoid invalid property value

fixes liferay#3946
@pat270 pat270 self-assigned this Feb 24, 2021
@pat270
Copy link
Member

pat270 commented Feb 24, 2021

Thanks for the report @giulioz! Just sent a fix in.

@github-actions
Copy link

This issue has been merged and will be released in DXP at https://issues.liferay.com/browse/LPS-128084

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment