Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

add SVG sprite versions #9

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mojoaxel
Copy link

This adds support for SVG sprites so all flags can be loaded at once instead of one-by-one. This is useful if a lot of flags are used at the same time (e.g. in a country picker).

  • Added example overview pages to show all 1x1 and 4x3 flags
  • Added dependecy on svg-sprite to create a sprite of all flag images.
  • Moved "common" SCSS styles from flagpack.scss to _common.scss, to also be able to use it in the sprites.
  • Added npm scripts compile:sprite and compile to create the new files:
    • dist/flagpack_1x1_sprite.css
    • dist/flagpack_1x1_sprite.svg
    • dist/flagpack_4x3_sprite.css
    • dist/flagpack_4x3_sprite.svg

This is a draft on quite a big change, but it does/should not affect the existing functionality at all. Therefore I would consider this a minor change.

@jackiboy Please let me know what you think about this pull-request anf if you could image merging this. If not I'll simply create a new npm package flagpack-sprites or something similar.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant