admin管理员组

文章数量:1290222

I use single quote '' and double quote "" in CSS regularly. Is there any size difference between them? If yes, I'd like to use the smaller one.

I use single quote '' and double quote "" in CSS regularly. Is there any size difference between them? If yes, I'd like to use the smaller one.

Share Improve this question asked Aug 28, 2020 at 13:22 akarimakarim 3052 gold badges5 silver badges15 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

There is no difference in terms of file size between single and double quotes.

Generally speaking, you should use whatever quotes are called for in the coding standard defined by the project you're using. If no coding standard is being used, at least be consistent with your usage.

WordPress specifies the following guidelines for using quotes in the CSS coding standards:

Selectors

Attribute selectors should use double quotes around values

Values

Use double quotes rather than single quotes, and only when needed, such as when a font name has a space or for the values of the content property.

I'd suggest following the WP coding standards if your project doesn't already have a standard defined.

本文标签: Is there any size difference between single quote 39 39 and double quote quot quot in CSS