Skip to content

Improve documentation on <url> #35029#43292

Merged
hamishwillee merged 28 commits intomdn:mainfrom
Sacrafex:patch-1
Mar 8, 2026
Merged

Improve documentation on <url> #35029#43292
hamishwillee merged 28 commits intomdn:mainfrom
Sacrafex:patch-1

Conversation

@Sacrafex
Copy link
Contributor

Added Further clarification to the file: behavior for the <url> CSS data type as fixes for #35030

Description

Motivation

To help readers understand browser restrictions when using <url> values.

Additional details

Linked to MDN CORS guide.

Clarified differences and file: URL limitations.

Related issues and pull requests

#35030

Added Documentation Support for <url>

Fixes for Issue mdn#35029
mdn#35030
@Sacrafex Sacrafex requested a review from a team as a code owner February 28, 2026 03:53
@Sacrafex Sacrafex requested review from hamishwillee and removed request for a team February 28, 2026 03:53
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs size/s [PR only] 6-50 LoC changed labels Feb 28, 2026
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@hamishwillee hamishwillee requested a review from estelle March 1, 2026 23:27
Copy link
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Sacrafex

I'm deferring proper rview to @estelle as I'm not as familiar with CSS as with Web APIs.

A few comments though:

  • Any additions like this should be before the specifications macro/section. Generally either in the top overview, or under a description heading, after the value section.
  • I'm not sure if this overstates the effect of CORS. Do all of these actually get blocked on the major browsers (I'm not sure they are).
  • Also many CSS fetches woudl be in no-cors mode - so while correct, it feels excessive.
  • File URL section true, but not sure if this is the rright place.

It might be that all of this should be a see also link to more general URL docs. Let's see what @estelle says.

@Sacrafex
Copy link
Contributor Author

Sacrafex commented Mar 2, 2026

Thanks for the comments. I'll take a look once I get a chance.

Copy link
Contributor Author

@Sacrafex Sacrafex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the Docs with working links and a more accurate description. Please let me know if I need to make fixes and another PR.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

Preview URLs (1 page)

Flaws (1)

Found an unexpected or unresolvable flaw? Please report it here.

URL: /en-US/docs/Web/CSS/Reference/Values/url_value
Title: <url>
Flaw count: 1

  • macros:
    • Macro htmlelement produces link /en-US/docs/Web/HTML/Reference/Elements/svg which doesn't resolve

(comment last updated: 2026-03-08 22:23:21)

Copy link
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made several suggestions

Sacrafex and others added 6 commits March 2, 2026 10:29
Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
Sacrafex and others added 3 commits March 2, 2026 10:33
Clarified the URL value requirement in the documentation.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Clarified CORS validation requirements for CSS properties using <url> values and added information about local file access issues.
Copy link
Contributor Author

@Sacrafex Sacrafex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated Requested Changes. Please let me know I should update anything else.

@Sacrafex Sacrafex requested a review from estelle March 2, 2026 18:58
Copy link
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basic syntax-like examples can go into the description section. The examples section is more for in-depth examples generally with live rendering.

Sacrafex and others added 2 commits March 3, 2026 06:06
Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
Clarified the description of URL values and updated examples.
Copy link
Contributor Author

@Sacrafex Sacrafex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed Changes.

@github-actions github-actions bot added size/m [PR only] 51-500 LoC changed and removed size/s [PR only] 6-50 LoC changed labels Mar 3, 2026
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. Thank you. Just one last suggestion on breaking up the examples in the description

@estelle estelle requested a review from hamishwillee March 5, 2026 09:30
@estelle
Copy link
Member

estelle commented Mar 5, 2026

@hamishwillee OK to merge?

@Sacrafex
Copy link
Contributor Author

Sacrafex commented Mar 6, 2026

We should be good to merge now. If there are any final tweaks you’d like, just let me know and I’d be happy to make them.

Clarified CORS requirements for certain CSS properties referencing external resources.
Copy link
Contributor Author

@Sacrafex Sacrafex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added Documentation on <url>
Includes examples, definitions & clarifications.

@Sacrafex Sacrafex requested a review from hamishwillee March 6, 2026 05:08
Copy link
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much @Sacrafex, and welcome to MDN (also @estelle for the review and feedback).

@hamishwillee hamishwillee merged commit 95f5082 into mdn:main Mar 8, 2026
7 of 8 checks passed
@Sacrafex
Copy link
Contributor Author

Sacrafex commented Mar 9, 2026

No problem. I'm glad to help out. I look forward to making more contributions in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:CSS Cascading Style Sheets docs size/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants