• Hi,

    I have a CSS style using the CALC () function.

    @media only screen and (min-width: 111em) {
    	.essb_displayed_sidebar {
    		left: calc( ( (92% - 1640px) / 2 ) - 17px );
    	}
    }

    The Customiser > Custom CSS reports:

    There is 1 error which must be fixed before you can save.
    [_] Update anyway, even though it might break your site?

    The line containing the Calc function isn’t flagged by the customiser as the line in question, but if I remove the calc() function the warning and error message goes away.

    Actually, No line in the Additional CSS window is actually showing any red flag (x) or red warning text. Which is an issue in itself.

    Although the CSS style entry works the customiser will continue (forever) to report this fault which will distract from any *new* errors that may occur in future.

    I am forever having to override the message and save at my risk.

    So:

    1. Can we have a “Never show this error for this CSS line number again” function?
    OR
    2. Fix the logic as to why CALC is invalid as a CSS style entry?

    Thoughts?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The issue appears to be with your use of spaces. Changing it to this resulted in no errors:

    @media only screen and (min-width: 111em) {
    	.essb_displayed_sidebar {
    		left: calc(((92% - 1640px) / 2 - 17px));
    	}
    }
    
    Thread Starter snaphappyme

    (@snaphappyme)

    @jakept great suggestion.

    I was just keeping it readable; but a great fix

    Isn’t extra space meant to be ignored? Must be related to strict validation of this function’s use.

    Thanks again.

    I still query why the line wasn’t highlighted and why the brackets weren’t red to show the issue it had.

    Room for improvement with editor.

    It also flags Custom Properties as errors, so definitely room for improvement.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Customiser Additional CSS > reports error when using CALC ()’ is closed to new replies.