Intent to Ship: Default SVG cursor size set from OS settings

82 views
Skip to first unread message

Sahir Vellani

unread,
May 26, 2022, 4:44:52 PMMay 26
to blink-dev
Contact emails
https://drafts.csswg.org/css-ui-3/#cursor

Summary

Platform cursor size used as default for custom SVG cursors if no specified size. SVG cursors can scale based on the platform accessibility/cursor settings. This can be overridden if the cursor has any specified dimensions. This feature is initially available on Windows only.



Blink component
Blink>SVG

TAG review

TAG review status
Not applicable

Risks


Interoperability and Compatibility

Web developers will need to reexamine the way they handle SVG cursors with no specified sizes. A custom cursor may be rendered where it was previously just the default cursor image.

Gecko: No signal

WebKit: No signal

Web developers: No signals

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?



Debuggability



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
No

Is this feature fully tested by web-platform-tests?
No

Flag name

Requires code in //chrome?
False

Tracking bug
https://bugs.chromium.org/p/chromium/issues/detail?id=737459

Estimated milestones

105



Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).



Link to entry on the Chrome Platform Status

Chris Harrelson

unread,
May 26, 2022, 9:18:09 PMMay 26
to Sahir Vellani, blink-dev
Hi Sahir,

On Thu, May 26, 2022 at 1:44 PM 'Sahir Vellani' via blink-dev <blin...@chromium.org> wrote:

Platform cursor size used as default for custom SVG cursors if no specified size. SVG cursors can scale based on the platform accessibility/cursor settings. This can be overridden if the cursor has any specified dimensions. This feature is initially available on Windows only.

Could you say why? Is it hard to implement?
 


Interoperability and Compatibility

Web developers will need to reexamine the way they handle SVG cursors with no specified sizes. A custom cursor may be rendered where it was previously just the default cursor image.

Is it possible this will break sites? How many sites use SVG cursors right now?
 

Gecko: No signal

WebKit: No signal

What do Gecko and Webkit do at the moment?
 

Web developers: No signals

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?



Debuggability



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
No

Is this feature fully tested by web-platform-tests?
No

Flag name

Requires code in //chrome?
False

Tracking bug
https://bugs.chromium.org/p/chromium/issues/detail?id=737459

Estimated milestones

105



Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).



Link to entry on the Chrome Platform Status

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/b87b0ab4-836d-45f0-af04-2ce26b3e718an%40chromium.org.

Paul Jensen

unread,
May 31, 2022, 10:55:17 AMMay 31
to blink-dev, Chris Harrelson, blink-dev, sahir....@microsoft.com
Is the SVG cursor size discernible to the site?

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Mike Taylor

unread,
May 31, 2022, 12:31:01 PMMay 31
to Sahir Vellani, blink-dev
Hi Sahir,

On 5/26/22 4:44 PM, 'Sahir Vellani' via blink-dev wrote:
Contact emails
https://drafts.csswg.org/css-ui-3/#cursor

Summary

Platform cursor size used as default for custom SVG cursors if no specified size. SVG cursors can scale based on the platform accessibility/cursor settings. This can be overridden if the cursor has any specified dimensions. This feature is initially available on Windows only.

It's not 100% clear to me what you're proposing shipping here (this may be due to my lack of expertise in this area), and the spec link doesn't help much I'm afraid. A short explainer with use cases and mockups or screenshots would be helpful, if you could post one. Or is this just a bugfix, rather than a new feature?


Blink component
Blink>SVG

TAG review

TAG review status
Not applicable

Risks


Interoperability and CompatibilityWeb developers will need to reexamine the way they handle SVG cursors with no specified sizes. A custom cursor may be rendered where it was previously just the default cursor image.
Could you explain why a different (presumably fallback) cursor would be rendered?


Gecko: No signal

WebKit: No signal

Web developers: No signals

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?



Debuggability

Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
No

Is this feature fully tested by web-platform-tests?
No

Flag name

Requires code in //chrome?
False

Tracking bug
https://bugs.chromium.org/p/chromium/issues/detail?id=737459

Estimated milestones

105



Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).



Link to entry on the Chrome Platform Status
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Sahir Vellani

unread,
Jun 1, 2022, 1:36:35 PMJun 1
to blink-dev, Paul Jensen, Chris Harrelson, blink-dev, sahir....@microsoft.com, gerc...@microsoft.com
On Tuesday, May 31, 2022 at 7:55:17 AM UTC-7 Paul Jensen wrote:
Is the SVG cursor size discernible to the site?
No, the actual size isn't discernible to the site. I believe that there is no way currently for Web Developers to know the size of the system cursor or whether it's being scaled by system settings.

On Thursday, May 26, 2022 at 9:18:09 PM UTC-4 Chris Harrelson wrote:
Hi Sahir,

On Thu, May 26, 2022 at 1:44 PM 'Sahir Vellani' via blink-dev <blin...@chromium.org> wrote:

Platform cursor size used as default for custom SVG cursors if no specified size. SVG cursors can scale based on the platform accessibility/cursor settings. This can be overridden if the cursor has any specified dimensions. This feature is initially available on Windows only.

Could you say why? Is it hard to implement?
On MacOS, it doesn't seem like the cursor size is readily available as part of the NSCursor API. I don't have too much expertise with the MacOS SDK so further investigation will be required. We do have plans to get this working on linux in the near future. However, I did not want that to block getting this enabled by default in Windows since it is an accessibility issue. 
 


Interoperability and Compatibility

Web developers will need to reexamine the way they handle SVG cursors with no specified sizes. A custom cursor may be rendered where it was previously just the default cursor image.

Is it possible this will break sites? How many sites use SVG cursors right now?
It seems unlikely, but unfortunately I do not have that number. The only way a site would break is if it was dependent on the default cursor being rendered over a certain area of the page. This change still has SVG cursors comply with the maximum cursor size supported by Chromium. 
 

Gecko: No signal

WebKit: No signal

What do Gecko and Webkit do at the moment?
Both browsers currently have the same behavior. Custom SVG cursors are not rendered if no size is specified. 
 

Web developers: No signals

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?



Debuggability



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
No

Is this feature fully tested by web-platform-tests?
No

Flag name

Requires code in //chrome?
False

Tracking bug
https://bugs.chromium.org/p/chromium/issues/detail?id=737459

Estimated milestones

105



Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).



Link to entry on the Chrome Platform Status

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Sahir Vellani

unread,
Jun 1, 2022, 1:36:41 PMJun 1
to blink-dev, mike...@chromium.org, blink-dev, sahir....@microsoft.com
On Tuesday, May 31, 2022 at 9:31:01 AM UTC-7 mike...@chromium.org wrote:
Hi Sahir,

On 5/26/22 4:44 PM, 'Sahir Vellani' via blink-dev wrote:
Contact emails
https://drafts.csswg.org/css-ui-3/#cursor

Summary

Platform cursor size used as default for custom SVG cursors if no specified size. SVG cursors can scale based on the platform accessibility/cursor settings. This can be overridden if the cursor has any specified dimensions. This feature is initially available on Windows only.

It's not 100% clear to me what you're proposing shipping here (this may be due to my lack of expertise in this area), and the spec link doesn't help much I'm afraid. A short explainer with use cases and mockups or screenshots would be helpful, if you could post one. Or is this just a bugfix, rather than a new feature?

This is basically a bug fix that will slightly change CSS cursor API behavior. The main change here is that web developers that specify an SVG to the CSS Cursor property with no specified size will see it rendered with the size being what Chromium gets from the platform. The spec states: "The default object size for cursor images is a UA-defined size that should be based on the size of a typical cursor on the UA’s operating system". With this change, this statement will be honored, as previously Chromium would not know the "typical" size of the cursor and just render a default cursor.


Blink component
Blink>SVG

TAG review

TAG review status
Not applicable

Risks


Interoperability and Compatibility 
Web developers will need to reexamine the way they handle SVG cursors with no specified sizes. A custom cursor may be rendered where it was previously just the default cursor image.
Could you explain why a different (presumably fallback) cursor would be rendered?
The scenario where a different cursor is rendered is as follows: Web developer sets an SVG image as the cursor but with no specified size. Without this change, the actual rendered cursor is the default for that cursor type (i.e. I beam, pointer). With this change, the actual rendered cursor will be the SVG image with a size being what the OS provides Chromium. 

Daniel Bratell

unread,
Jun 2, 2022, 3:37:23 PMJun 2
to Sahir Vellani, blink-dev, mike...@chromium.org, sahir....@microsoft.com

LGTM1.

It would be better if it was more cross-platform, but I accept that this is the best we can do right now. And I agree that this is close to a bug fix.

/Daniel

Yoav Weiss

unread,
Jun 3, 2022, 2:42:35 AMJun 3
to Daniel Bratell, Sahir Vellani, blink-dev, mike...@chromium.org, sahir....@microsoft.com

Chris Harrelson

unread,
Jun 3, 2022, 11:51:28 AMJun 3
to Yoav Weiss, Daniel Bratell, Sahir Vellani, blink-dev, mike...@chromium.org, sahir....@microsoft.com
LGTM3. Please also file an issue tracking implementation on other platforms, if there is not one already.

Reply all
Reply to author
Forward
0 new messages