Skip to content

Replace usage of @import in CSS with documented recommended CSS imports #178

@spwoodcock

Description

@spwoodcock

Describe the bug

Related to #177

  • Using @import within a stylesheet causes a download waterfall.
  • Instead of stylesheets loading in parallel, they are loaded in sequence.
  • This causes poor performance on first page load, and even flash of unstyled content.
  • This is particularly apparent from the google font imports.

Alternative

  • Instead of doing this, we should probably just document well which imports should be included in any app that runs hotosm/ui.
  • This will allow all stylesheets to load in parallel and be cached nicely in browser too.
  • Overall, at the expense of a little better documentation, we have a much nicer solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions