mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-16 23:31:55 +00:00
LibWeb/CSS: Support media queries in import at-rules
This commit is contained in:
parent
c1fe912bf9
commit
ac19b0cda8
Notes:
github-actions[bot]
2025-04-02 13:56:49 +00:00
Author: https://github.com/tcl3
Commit: ac19b0cda8
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4183
Reviewed-by: https://github.com/AtkinsSJ ✅
7 changed files with 51 additions and 15 deletions
|
@ -119,7 +119,7 @@ Vector<Rule> Parser::parse_a_stylesheets_contents(TokenStream<T>& input)
|
|||
}
|
||||
|
||||
// https://drafts.csswg.org/css-syntax/#parse-a-css-stylesheet
|
||||
CSSStyleSheet* Parser::parse_as_css_stylesheet(Optional<URL::URL> location)
|
||||
CSSStyleSheet* Parser::parse_as_css_stylesheet(Optional<URL::URL> location, Vector<NonnullRefPtr<MediaQuery>> media_query_list)
|
||||
{
|
||||
// To parse a CSS stylesheet, first parse a stylesheet.
|
||||
auto const& style_sheet = parse_a_stylesheet(m_token_stream, {});
|
||||
|
@ -138,7 +138,7 @@ CSSStyleSheet* Parser::parse_as_css_stylesheet(Optional<URL::URL> location)
|
|||
}
|
||||
|
||||
auto rule_list = CSSRuleList::create(realm(), rules);
|
||||
auto media_list = MediaList::create(realm(), {});
|
||||
auto media_list = MediaList::create(realm(), move(media_query_list));
|
||||
return CSSStyleSheet::create(realm(), rule_list, media_list, move(location));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue