chharvey / bangs

Bangs are unopinionated, single-responsibility CSS class selectors marked with !important. Inspired by Atoms, Tachyons, Gravitons and BEMIT.
https://www.npmjs.com/package/bangs
MIT License
1 stars 0 forks source link

add background-position #12

Open chharvey opened 8 years ago

chharvey commented 8 years ago

background position (.-bp) values:

initial          0     (`0% 0%`)
inherit          i
left             l     (same as `left center`)
right            r     (same as `right center`)
center           c     (same as `center center`)
top              t     (same as `center top`)
bottom           b     (same as `center bottom`)
left top         lt    (same as `0% 0%` (initial))
left center      lc
left bottom      lb
center top       ct
center center    cc
center bottom    cb
right top        rt
right center     rc
right bottom     rb
chharvey commented 7 years ago

Reopening this issue. Depends on CSS Logical Properties ( #34 ).

Add the following longhand properties and values:

-bpx-c    -bpx-l    -bpx-r
-bpy-c    -bpy-t    -bpy-b
-bp?-c    -bp?-?    -bp?-?
-bp?-c    -bp?-?    -bp?-?

one-value:

center          // shorthand value for `center center`
left            // shorthand value for `left center`
right           // shorthand value for `right center`
inline-start    // shorthand value for `start center`
inline-end      // shorthand value for `end center`
top             // shorthand value for `center top`
bottom          // shorthand value for `center bottom`
block-start     // shorthand value for `center start`
block-end       // shorthand value for `center end`
start           // shorthand value for `start start`
end             // shorthand value for `end end`

two-value:

center center
center top
center bottom
center start
center end
left   center
left   top
left   bottom
left   start
left   end
right  center
right  top
right  bottom
right  start
right  end
start  center
start  top
start  bottom
start  start
start  end
end    center
end    top
end    bottom
end    start
end    end
chharvey commented 7 years ago

bangs v0.16.0 (logical properties & values)

chharvey commented 6 years ago

Level 3 Standard: https://www.w3.org/TR/css-backgrounds-3/#propdef-background-position

Level 4 Draft: https://drafts.csswg.org/css-backgrounds-4/#propdef-background-position

MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/background-position