Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Incorrect URL Syntax in @font-face Declarations #100

Closed
1 task done
Vanessa082 opened this issue Oct 5, 2024 · 2 comments · Fixed by #102
Closed
1 task done

[Bug] Incorrect URL Syntax in @font-face Declarations #100

Vanessa082 opened this issue Oct 5, 2024 · 2 comments · Fixed by #102
Assignees
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟩 priority: low Low priority and doesn't need to be rushed 🏁 status: ready for work Ready for work

Comments

@Vanessa082
Copy link
Contributor

Description

Incorrect URL syntax in @font-face declaration. The url() value is not enclosed in quotes, which may lead to unexpected behavior in certain browsers.

Reproduction

  1. Open the CSS library-vars.css file containing the @font-face declarations.
  2. Locate the @font-face rules for fonts such as "Source Sans Pro" and "Roboto Condensed."
  3. Observe that some url() values are not enclosed in quotes.
  4. See error.

Expectation

The URL () value should be enclosed in quotes to ensure consistent behavior across all browsers.

Screenshots

Screenshot from 2024-10-05 13-32-35

Environment

  • Device: Laptop
  • OS: Linux
  • Browser: Chrome

Resolution

  • I would be interested in resolving this bug.
@Vanessa082 Vanessa082 added 💻 aspect: code Concerns the software code in the repository 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work 🛠 goal: fix Bug fix 🟧 priority: high Stalls work on the project or its dependents labels Oct 5, 2024
@possumbilities
Copy link
Contributor

HI @Vanessa082 and thanks for this!

I'm not sure that adding the quotes is required at this time:

Quotes are required if the URL includes parentheses, whitespace, or quotes, unless these characters are escaped, or if the address includes control characters above 0x7e. --(https://developer.mozilla.org/en-US/docs/Web/CSS/url_function)

Could you specific which browsers would encounter an issue here?

@possumbilities possumbilities added 🧹 status: ticket work required Needs more details before it can be worked on and removed 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work labels Oct 7, 2024
@possumbilities possumbilities moved this from Triage to Backlog in possumbilities Oct 7, 2024
@Vanessa082
Copy link
Contributor Author

Hi @possumbilities

Thank you for your feedback regarding the use of quotes in the URL () values within the @font-face declarations. I appreciate your reference to the MDN documentation; it provides valuable context on when quotes are required.

While it's true that many modern browsers can handle unquoted URLs without issues, I believe adopting a consistent practice of enclosing all URLs in quotes can enhance clarity and maintainability in our CSS. I suggest we go for one

In light of this, I recommend we adopt a policy of consistency, using quotes consistently to help maintain clarity and readability in your CSS. This also avoids any potential confusion about where the URL begins and ends, especially for other developers reading your code.

Thank you for considering this suggestion, and I'm looking forward to any further thoughts you might have!

@possumbilities possumbilities added 🟩 priority: low Low priority and doesn't need to be rushed 🏁 status: ready for work Ready for work and removed 🟧 priority: high Stalls work on the project or its dependents 🧹 status: ticket work required Needs more details before it can be worked on labels Oct 14, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in possumbilities Oct 15, 2024
Asheklm6 added a commit to Asheklm6/vocabulary that referenced this issue Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟩 priority: low Low priority and doesn't need to be rushed 🏁 status: ready for work Ready for work
Projects
Archived in project
2 participants