gov-au-ui-kit icon indicating copy to clipboard operation
gov-au-ui-kit copied to clipboard

Improvement - prefix variables with a namespace like "uikit"

Open elisechant opened this issue 8 years ago • 4 comments

It's difficult to include ui-kit in existing projects because of the collision of Sass variables which are global. To avoid collisions prefix ui-kit variables with some namespace.

ie.

$base-z-index: 0;
$base-border-radius: 3px;
$tiny-border-radius: 1px;

might be

$uikit-base-z-index: 0;
$uikit-base-border-radius: 3px;
$uikit-tiny-border-radius: 1px;

elisechant avatar Sep 05 '16 23:09 elisechant

Sensible idea, I like it. I vote for au as the prefix; to remind us who we're making this for ;)

TrebBrennan avatar Sep 05 '16 23:09 TrebBrennan

Great suggestion @elisechant, the only thing for us to do is decide what the prefix should be

  1. $govau-uikit-
  2. $govau-
  3. $au-

Or something else?

petronbot avatar Sep 05 '16 23:09 petronbot

FWIW from my last PR I had added $gov-ui-kit-image-base-url for this very reason.

https://github.com/AusDTO/gov-au-ui-kit/blob/develop/assets/sass/_variables.scss#L12

nathf avatar Sep 05 '16 23:09 nathf

Added to Jira under DESIGN-443.

klepas avatar Sep 07 '16 02:09 klepas