Add list-inside and list-outside utilities

This commit is contained in:
Adam Wathan 2019-03-13 14:26:07 -04:00
parent 7178c43d2c
commit e13413153f
5 changed files with 216 additions and 122 deletions

View file

@ -569,18 +569,6 @@ samp {
}
}
.list-none {
list-style-type: none !important;
}
.list-disc {
list-style-type: disc !important;
}
.list-decimal {
list-style-type: decimal !important;
}
.appearance-none {
appearance: none !important;
}
@ -3187,6 +3175,26 @@ samp {
line-height: 2 !important;
}
.list-inside {
list-style-position: inside !important;
}
.list-outside {
list-style-position: outside !important;
}
.list-none {
list-style-type: none !important;
}
.list-disc {
list-style-type: disc !important;
}
.list-decimal {
list-style-type: decimal !important;
}
.m-0 {
margin: 0 !important;
}
@ -6609,18 +6617,6 @@ samp {
}
@media (min-width: 640px) {
.sm\:list-none {
list-style-type: none !important;
}
.sm\:list-disc {
list-style-type: disc !important;
}
.sm\:list-decimal {
list-style-type: decimal !important;
}
.sm\:appearance-none {
appearance: none !important;
}
@ -9219,6 +9215,26 @@ samp {
line-height: 2 !important;
}
.sm\:list-inside {
list-style-position: inside !important;
}
.sm\:list-outside {
list-style-position: outside !important;
}
.sm\:list-none {
list-style-type: none !important;
}
.sm\:list-disc {
list-style-type: disc !important;
}
.sm\:list-decimal {
list-style-type: decimal !important;
}
.sm\:m-0 {
margin: 0 !important;
}
@ -12626,18 +12642,6 @@ samp {
}
@media (min-width: 768px) {
.md\:list-none {
list-style-type: none !important;
}
.md\:list-disc {
list-style-type: disc !important;
}
.md\:list-decimal {
list-style-type: decimal !important;
}
.md\:appearance-none {
appearance: none !important;
}
@ -15236,6 +15240,26 @@ samp {
line-height: 2 !important;
}
.md\:list-inside {
list-style-position: inside !important;
}
.md\:list-outside {
list-style-position: outside !important;
}
.md\:list-none {
list-style-type: none !important;
}
.md\:list-disc {
list-style-type: disc !important;
}
.md\:list-decimal {
list-style-type: decimal !important;
}
.md\:m-0 {
margin: 0 !important;
}
@ -18643,18 +18667,6 @@ samp {
}
@media (min-width: 1024px) {
.lg\:list-none {
list-style-type: none !important;
}
.lg\:list-disc {
list-style-type: disc !important;
}
.lg\:list-decimal {
list-style-type: decimal !important;
}
.lg\:appearance-none {
appearance: none !important;
}
@ -21253,6 +21265,26 @@ samp {
line-height: 2 !important;
}
.lg\:list-inside {
list-style-position: inside !important;
}
.lg\:list-outside {
list-style-position: outside !important;
}
.lg\:list-none {
list-style-type: none !important;
}
.lg\:list-disc {
list-style-type: disc !important;
}
.lg\:list-decimal {
list-style-type: decimal !important;
}
.lg\:m-0 {
margin: 0 !important;
}
@ -24660,18 +24692,6 @@ samp {
}
@media (min-width: 1280px) {
.xl\:list-none {
list-style-type: none !important;
}
.xl\:list-disc {
list-style-type: disc !important;
}
.xl\:list-decimal {
list-style-type: decimal !important;
}
.xl\:appearance-none {
appearance: none !important;
}
@ -27270,6 +27290,26 @@ samp {
line-height: 2 !important;
}
.xl\:list-inside {
list-style-position: inside !important;
}
.xl\:list-outside {
list-style-position: outside !important;
}
.xl\:list-none {
list-style-type: none !important;
}
.xl\:list-disc {
list-style-type: disc !important;
}
.xl\:list-decimal {
list-style-type: decimal !important;
}
.xl\:m-0 {
margin: 0 !important;
}

View file

@ -569,18 +569,6 @@ samp {
}
}
.list-none {
list-style-type: none;
}
.list-disc {
list-style-type: disc;
}
.list-decimal {
list-style-type: decimal;
}
.appearance-none {
appearance: none;
}
@ -3187,6 +3175,26 @@ samp {
line-height: 2;
}
.list-inside {
list-style-position: inside;
}
.list-outside {
list-style-position: outside;
}
.list-none {
list-style-type: none;
}
.list-disc {
list-style-type: disc;
}
.list-decimal {
list-style-type: decimal;
}
.m-0 {
margin: 0;
}
@ -6609,18 +6617,6 @@ samp {
}
@media (min-width: 640px) {
.sm\:list-none {
list-style-type: none;
}
.sm\:list-disc {
list-style-type: disc;
}
.sm\:list-decimal {
list-style-type: decimal;
}
.sm\:appearance-none {
appearance: none;
}
@ -9219,6 +9215,26 @@ samp {
line-height: 2;
}
.sm\:list-inside {
list-style-position: inside;
}
.sm\:list-outside {
list-style-position: outside;
}
.sm\:list-none {
list-style-type: none;
}
.sm\:list-disc {
list-style-type: disc;
}
.sm\:list-decimal {
list-style-type: decimal;
}
.sm\:m-0 {
margin: 0;
}
@ -12626,18 +12642,6 @@ samp {
}
@media (min-width: 768px) {
.md\:list-none {
list-style-type: none;
}
.md\:list-disc {
list-style-type: disc;
}
.md\:list-decimal {
list-style-type: decimal;
}
.md\:appearance-none {
appearance: none;
}
@ -15236,6 +15240,26 @@ samp {
line-height: 2;
}
.md\:list-inside {
list-style-position: inside;
}
.md\:list-outside {
list-style-position: outside;
}
.md\:list-none {
list-style-type: none;
}
.md\:list-disc {
list-style-type: disc;
}
.md\:list-decimal {
list-style-type: decimal;
}
.md\:m-0 {
margin: 0;
}
@ -18643,18 +18667,6 @@ samp {
}
@media (min-width: 1024px) {
.lg\:list-none {
list-style-type: none;
}
.lg\:list-disc {
list-style-type: disc;
}
.lg\:list-decimal {
list-style-type: decimal;
}
.lg\:appearance-none {
appearance: none;
}
@ -21253,6 +21265,26 @@ samp {
line-height: 2;
}
.lg\:list-inside {
list-style-position: inside;
}
.lg\:list-outside {
list-style-position: outside;
}
.lg\:list-none {
list-style-type: none;
}
.lg\:list-disc {
list-style-type: disc;
}
.lg\:list-decimal {
list-style-type: decimal;
}
.lg\:m-0 {
margin: 0;
}
@ -24660,18 +24692,6 @@ samp {
}
@media (min-width: 1280px) {
.xl\:list-none {
list-style-type: none;
}
.xl\:list-disc {
list-style-type: disc;
}
.xl\:list-decimal {
list-style-type: decimal;
}
.xl\:appearance-none {
appearance: none;
}
@ -27270,6 +27290,26 @@ samp {
line-height: 2;
}
.xl\:list-inside {
list-style-position: inside;
}
.xl\:list-outside {
list-style-position: outside;
}
.xl\:list-none {
list-style-type: none;
}
.xl\:list-disc {
list-style-type: disc;
}
.xl\:list-decimal {
list-style-type: decimal;
}
.xl\:m-0 {
margin: 0;
}

View file

@ -33,6 +33,7 @@ module.exports = {
fontWeight: ['responsive', 'hover', 'focus'],
height: ['responsive'],
lineHeight: ['responsive'],
listStylePosition: ['responsive'],
listStyleType: ['responsive'],
margin: ['responsive'],
maxHeight: ['responsive'],

View file

@ -1,5 +1,4 @@
import preflight from './plugins/preflight'
import listStyleType from './plugins/listStyleType'
import appearance from './plugins/appearance'
import backgroundAttachment from './plugins/backgroundAttachment'
import backgroundColor from './plugins/backgroundColor'
@ -27,6 +26,8 @@ import fontFamily from './plugins/fontFamily'
import fontWeight from './plugins/fontWeight'
import height from './plugins/height'
import lineHeight from './plugins/lineHeight'
import listStylePosition from './plugins/listStylePosition'
import listStyleType from './plugins/listStyleType'
import margin from './plugins/margin'
import maxHeight from './plugins/maxHeight'
import maxWidth from './plugins/maxWidth'
@ -66,7 +67,6 @@ import configurePlugins from './util/configurePlugins'
export default function({ corePlugins: corePluginConfig }) {
return configurePlugins(corePluginConfig, {
preflight,
listStyleType,
appearance,
backgroundAttachment,
backgroundColor,
@ -94,6 +94,8 @@ export default function({ corePlugins: corePluginConfig }) {
fontWeight,
height,
lineHeight,
listStylePosition,
listStyleType,
margin,
maxHeight,
maxWidth,

View file

@ -0,0 +1,11 @@
export default function() {
return function({ addUtilities, config }) {
addUtilities(
{
'.list-inside': { 'list-style-position': 'inside' },
'.list-outside': { 'list-style-position': 'outside' },
},
config('variants.listStylePosition')
)
}
}