Giter Site home page Giter Site logo

Comments (6)

mdo avatar mdo commented on July 18, 2024 1

This was fixed at some point.

from code-guide.

paulhirschi avatar paulhirschi commented on July 18, 2024

The official W3 spec has it in double quotes url("source.img") This is the convention I follow, and I see used most often.

from code-guide.

nhall avatar nhall commented on July 18, 2024

I've tended to treat this like I do the trailing slash of self-closing tags.

Don't include a trailing slash in self-closing elements—the HTML5 spec says they're optional.

The W3C says these quotes are optional so I would rather omit all together.

from code-guide.

johannesnagl avatar johannesnagl commented on July 18, 2024

iirc, you need them, when you have spaces in the referenced file name. so it's always good to always use the quotes.

i think, in regard to this rule:
"Quote attribute values in selectors, e.g., input[type="text"]. They’re only optional in some cases, and it’s a good practice for consistency."

it should always be applied, when i recall the case with spaces correctly.

from code-guide.

hozefaj avatar hozefaj commented on July 18, 2024

Whether using single quotes or double quotes, just being consistent across the project does the trick.

from code-guide.

Donneh avatar Donneh commented on July 18, 2024

You shouldn't have spaces in filenames though.

from code-guide.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.