You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to use element.classList.add() with a CSS custom property containing a space, the following error occurs:
Unhandled Runtime Error
InvalidCharacterError: Failed to execute 'add' on 'DOMTokenList': The token provided ('[--lexical-indent-base-value: 40px]') contains HTML space characters, which are not valid in tokens.
Possible Solutions: element.classList.add('[--lexical-indent-base-value: 40px]');
->
Use style.setProperty instead: element.style.setProperty('--lexical-indent-base-value', '40px');
Remove the space from the token: element.classList.add('[--lexical-indent-base-value:40px]');
The text was updated successfully, but these errors were encountered:
When attempting to use element.classList.add() with a CSS custom property containing a space, the following error occurs:
Possible Solutions:
element.classList.add('[--lexical-indent-base-value: 40px]');
->
style.setProperty
instead:element.style.setProperty('--lexical-indent-base-value', '40px');
element.classList.add('[--lexical-indent-base-value:40px]');
The text was updated successfully, but these errors were encountered: