Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Server-side apis get all stylesheet at once (maybe it should only get the "current") #516

Open
Labels
@davesnx

Description

@davesnx

This isn't a big issue and more like an optimisation, where we could only append to the stylesheet the current classNames being used.

We could introduceStylesheet.collect to analyse the html as a string, and compare the classnames.
Making sure the "critical" is the required to be appended to the resultant HTML.

let stylesheet = Stylesheet.get_all();let html = ReactDOMServer.renderToString(<App />);let (critical, other) = Stylesheet.collect(html, css);

Taken from:https://github.com/callstack/linaria/blob/master/docs/API.md#collecthtml-string-css-string--string

The API might change, but the solution should look quite similar

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp