-
Notifications
You must be signed in to change notification settings - Fork 227
Minimal CSSStyleSheet #790
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
base: main
Are you sure you want to change the base?
Conversation
src/browser/cssom/css_stylesheet.zig
Outdated
pub const CSSStyleSheet = struct { | ||
pub const prototype = *StyleSheet; | ||
|
||
css_rules: *CSSRuleList, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this a pointer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer a pointer
return .{ .css_rules = rules, .owner_rule = null }; | ||
} | ||
|
||
pub fn get_ownerRule(_: *CSSStyleSheet) ?*CSSImportRule { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pub fn get_ownerRule(_: *CSSStyleSheet) ?*CSSImportRule { | |
pub fn get_ownerRule(_: *CSSStyleSheet) ?*CSSImportRule { |
Not a big deal. Can also be done in get_cssRules
src/browser/cssom/stylesheet.zig
Outdated
title: []const u8, | ||
type: []const u8, | ||
|
||
pub fn get_disabled(self: *StyleSheet) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pub fn get_disabled(self: *StyleSheet) bool { | |
pub fn get_disabled(self: *const StyleSheet) bool { |
(same as for the other ones)
This is a super barebones CSSStyleSheet, mostly for just resolving various Custom Elements complaining about a lack of the CSSStyleSheet interface.
A lot of functionality is not implemented but it seems to allow more components to load on the Reddit example.