Skip to content

Commit

Permalink
Merge pull request #25 from dunkmann00/primitives
Browse files Browse the repository at this point in the history
Add primer css primitives into the theme's css
  • Loading branch information
dunkmann00 authored Mar 23, 2024
2 parents 8d74c90 + 8402bc2 commit ef5d38f
Show file tree
Hide file tree
Showing 22 changed files with 9,363 additions and 0 deletions.
19 changes: 19 additions & 0 deletions _sass/@primer/primitives/dist/css/base/size/size.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
:root {
--base-size-4: 0.25rem;
--base-size-8: 0.5rem;
--base-size-12: 0.75rem;
--base-size-16: 1rem;
--base-size-20: 1.25rem;
--base-size-24: 1.5rem;
--base-size-28: 1.75rem;
--base-size-32: 2rem;
--base-size-36: 2.25rem;
--base-size-40: 2.5rem;
--base-size-44: 2.75rem;
--base-size-48: 3rem;
--base-size-64: 4rem;
--base-size-80: 5rem;
--base-size-96: 6rem;
--base-size-112: 7rem;
--base-size-128: 8rem;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
:root {
--base-text-weight-light: 300;
--base-text-weight-normal: 400;
--base-text-weight-medium: 500;
--base-text-weight-semibold: 600;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
:root {
--motion-skeletonLoader-shimmer-duration-scale: 1s;
--motion-spinner-duration-rotation: 1s;
--motion-loading-delay-default: 1s;
}
14 changes: 14 additions & 0 deletions _sass/@primer/primitives/dist/css/functional/size/border.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
:root {
--boxShadow-thin: inset 0 0 0 max(1px, 0.0625rem);
--boxShadow-thick: inset 0 0 0 max(2px, 0.125rem);
--boxShadow-thicker: inset 0 0 0 max(4px, 0.25rem);
--borderWidth-thin: max(1px, 0.0625rem);
--borderWidth-thick: max(2px, 0.125rem);
--borderWidth-thicker: max(4px, 0.25rem);
--borderRadius-small: 0.1875rem;
--borderRadius-medium: 0.375rem;
--borderRadius-large: 0.75rem;
--borderRadius-full: 624.9375rem;
--outline-focus-offset: -0.125rem;
--outline-focus-width: 0.125rem;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
:root {
--breakpoint-xsmall: 20rem;
--breakpoint-small: 34rem;
--breakpoint-medium: 48rem;
--breakpoint-large: 63.25rem;
--breakpoint-xlarge: 80rem;
--breakpoint-xxlarge: 87.5rem;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@media (pointer: coarse) {
:root {
--control-minTarget-auto: 2.75rem;
--controlStack-small-gap-auto: 1rem;
--controlStack-medium-gap-auto: 0.75rem;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@media (pointer: fine) {
:root {
--control-minTarget-auto: 1rem;
--controlStack-small-gap-auto: 0.5rem;
--controlStack-medium-gap-auto: 0.5rem;
}
}
74 changes: 74 additions & 0 deletions _sass/@primer/primitives/dist/css/functional/size/size.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
:root {
--control-minTarget-fine: 1rem;
--control-minTarget-coarse: 2.75rem;
--control-xsmall-size: 1.5rem;
--control-xsmall-lineBoxHeight: 1.25rem;
--control-xsmall-paddingBlock: 0.125rem;
--control-xsmall-paddingInline-condensed: 0.25rem;
--control-xsmall-paddingInline-normal: 0.5rem;
--control-xsmall-paddingInline-spacious: 0.75rem;
--control-xsmall-gap: 0.25rem;
--control-small-size: 1.75rem;
--control-small-lineBoxHeight: 1.25rem;
--control-small-paddingBlock: 0.25rem;
--control-small-paddingInline-condensed: 0.5rem;
--control-small-paddingInline-normal: 0.75rem;
--control-small-gap: 0.25rem;
--control-medium-size: 2rem;
--control-medium-lineBoxHeight: 1.25rem;
--control-medium-paddingBlock: 0.375rem;
--control-medium-paddingInline-condensed: 0.5rem;
--control-medium-paddingInline-normal: 0.75rem;
--control-medium-paddingInline-spacious: 1rem;
--control-medium-gap: 0.5rem;
--control-large-size: 2.5rem;
--control-large-lineBoxHeight: 1.25rem;
--control-large-paddingBlock: 0.625rem;
--control-large-paddingInline-normal: 0.75rem;
--control-large-paddingInline-spacious: 1rem;
--control-large-gap: 0.5rem;
--control-xlarge-size: 3rem;
--control-xlarge-lineBoxHeight: 1.25rem;
--control-xlarge-paddingBlock: 0.875rem;
--control-xlarge-paddingInline-normal: 0.75rem;
--control-xlarge-paddingInline-spacious: 1rem;
--control-xlarge-gap: 0.5rem;
--controlStack-small-gap-condensed: 0.5rem;
--controlStack-small-gap-spacious: 1rem;
--controlStack-medium-gap-condensed: 0.5rem;
--controlStack-medium-gap-spacious: 0.75rem;
--controlStack-large-gap-auto: 0.5rem;
--controlStack-large-gap-condensed: 0.5rem;
--controlStack-large-gap-spacious: 0.75rem;
--space-xxsmall: 0.125rem;
--space-xsmall: 0.25rem;
--space-small: 0.375rem;
--space-medium: 0.5rem;
--space-large: 0.75rem;
--space-xlarge: 1rem;
--spinner-strokeWidth-default: 0.125rem;
--spinner-size-small: 1rem;
--spinner-size-medium: 2rem;
--spinner-size-large: 4rem;
--stack-padding-condensed: 0.5rem;
--stack-padding-normal: 1rem;
--stack-padding-spacious: 1.5rem;
--stack-gap-condensed: 0.5rem;
--stack-gap-normal: 1rem;
--stack-gap-spacious: 1.5rem;
--overlay-width-xsmall: 12rem;
--overlay-width-small: 20rem;
--overlay-width-medium: 30rem;
--overlay-width-large: 40rem;
--overlay-width-xlarge: 60rem;
--overlay-height-small: 16rem;
--overlay-height-medium: 20rem;
--overlay-height-large: 27rem;
--overlay-height-xlarge: 37.5rem;
--overlay-padding-normal: 1rem;
--overlay-padding-condensed: 0.5rem;
--overlay-paddingBlock-condensed: 0.25rem;
--overlay-paddingBlock-normal: 0.75rem;
--overlay-borderRadius: 0.375rem;
--overlay-offset: 0.25rem;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@custom-media --viewportRange-narrow (max-width: calc(48rem - 0.02px));
@custom-media --viewportRange-narrowLandscape (max-width: calc(63.25rem - 0.02px) and (max-height: calc(34rem - 0.02px)) and (orientation: landscape));
@custom-media --viewportRange-regular (min-width: 48rem);
@custom-media --viewportRange-wide (min-width: 87.5rem);
@custom-media --viewportRange-portrait (orientation: portrait);
@custom-media --viewportRange-landscape (orientation: landscape);
Loading

0 comments on commit ef5d38f

Please sign in to comment.