Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita1373e2

Browse files
gibson042mgol
authored andcommitted
CSS: Justify use of rtrim on CSS property values
CSS does not acknowledge carriage return or form feed charactersas whitespace but it does replace them with whitespace, making itacceptable to use `rtrim`.Closesgh-4956(cherry picked from commit655c0ed)
1 parent5566988 commita1373e2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎src/css/curCSS.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ function curCSS( elem, name, computed ) {
3232

3333
// trim whitespace for custom property (issue gh-4926)
3434
if(isCustomProp){
35+
36+
// rtrim treats U+000D CARRIAGE RETURN and U+000C FORM FEED
37+
// as whitespace while CSS does not, but this is not a problem
38+
// because CSS preprocessing replaces them with U+000A LINE FEED
39+
// (which *is* CSS whitespace)
40+
// https://www.w3.org/TR/css-syntax-3/#input-preprocessing
3541
ret=ret.replace(rtrimCSS,"$1");
3642
}
3743

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp