Skip to content
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

Isolating of staking dapp css && extracting of non-critical css #2514

Merged
merged 5 commits into from
Aug 9, 2019

Conversation

vbaranov
Copy link
Member

@vbaranov vbaranov commented Aug 6, 2019

A part of #2390

Motivation

310kB of CSS is loading synchronously before rendering of every Blockscout page

  • ⬇️ 5kB of savings from Isolating of staking dapp styles. It means, 5kB less of styles will be loaded on each page of Blockscout (except staking dapp)
  • ⬇️ 10kB of savings from extracting of non-critical CSS (modals, tooltips. qr-code). It means, 10kB less of styles will be loaded on each page of Blockscout. They will be loaded asynchronously.

5% of savings at all == pages should open ~50ms faster

Changelog

Enhancements

  • staking dap styles is isolated in ./apps/blockscout_web/assets/css/components/stakes. Resulting ./css/stakes.css generates and is supposed to be used on staking dapp page.
  • modals, tooltips, qr-code styles are extracted to critical CSS and loaded asynchronously not blocking page rendering.

Checklist for your PR

@vbaranov vbaranov added the wip label Aug 6, 2019
@vbaranov vbaranov added ready for review This PR is ready for reviews. and removed wip labels Aug 6, 2019
@vbaranov vbaranov self-assigned this Aug 6, 2019
@vbaranov vbaranov merged commit 38e64f1 into master Aug 9, 2019
@vbaranov vbaranov deleted the vb-isolate-staking-css branch August 9, 2019 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review This PR is ready for reviews.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants