diff --git a/src/index.test.js b/src/index.test.js index 7f2f51f..f2f8c12 100644 --- a/src/index.test.js +++ b/src/index.test.js @@ -55,20 +55,13 @@ it('should generate the default classes for the typography components', async () font-weight: 600; } - .prose ol { - counter-reset: list-counter; - margin-top: 1.25em; - margin-bottom: 1.25em; - } - .prose ol > li { position: relative; - counter-increment: list-counter; padding-left: 1.75em; } .prose ol > li::before { - content: counter(list-counter) \\".\\"; + content: counter(list-item) \\".\\"; position: absolute; font-weight: 400; color: #6b7280; @@ -292,6 +285,11 @@ it('should generate the default classes for the typography components', async () font-size: 0.9em; } + .prose ol { + margin-top: 1.25em; + margin-bottom: 1.25em; + } + .prose ul { margin-top: 1.25em; margin-bottom: 1.25em; @@ -1341,20 +1339,13 @@ it('should generate the default classes for the typography components', async () font-weight: 600; } - .sm\\\\:prose ol { - counter-reset: list-counter; - margin-top: 1.25em; - margin-bottom: 1.25em; - } - .sm\\\\:prose ol > li { position: relative; - counter-increment: list-counter; padding-left: 1.75em; } .sm\\\\:prose ol > li::before { - content: counter(list-counter) \\".\\"; + content: counter(list-item) \\".\\"; position: absolute; font-weight: 400; color: #6b7280; @@ -1578,6 +1569,11 @@ it('should generate the default classes for the typography components', async () font-size: 0.9em; } + .sm\\\\:prose ol { + margin-top: 1.25em; + margin-bottom: 1.25em; + } + .sm\\\\:prose ul { margin-top: 1.25em; margin-bottom: 1.25em; @@ -2628,20 +2624,13 @@ it('should generate the default classes for the typography components', async () font-weight: 600; } - .md\\\\:prose ol { - counter-reset: list-counter; - margin-top: 1.25em; - margin-bottom: 1.25em; - } - .md\\\\:prose ol > li { position: relative; - counter-increment: list-counter; padding-left: 1.75em; } .md\\\\:prose ol > li::before { - content: counter(list-counter) \\".\\"; + content: counter(list-item) \\".\\"; position: absolute; font-weight: 400; color: #6b7280; @@ -2865,6 +2854,11 @@ it('should generate the default classes for the typography components', async () font-size: 0.9em; } + .md\\\\:prose ol { + margin-top: 1.25em; + margin-bottom: 1.25em; + } + .md\\\\:prose ul { margin-top: 1.25em; margin-bottom: 1.25em; @@ -3915,20 +3909,13 @@ it('should generate the default classes for the typography components', async () font-weight: 600; } - .lg\\\\:prose ol { - counter-reset: list-counter; - margin-top: 1.25em; - margin-bottom: 1.25em; - } - .lg\\\\:prose ol > li { position: relative; - counter-increment: list-counter; padding-left: 1.75em; } .lg\\\\:prose ol > li::before { - content: counter(list-counter) \\".\\"; + content: counter(list-item) \\".\\"; position: absolute; font-weight: 400; color: #6b7280; @@ -4152,6 +4139,11 @@ it('should generate the default classes for the typography components', async () font-size: 0.9em; } + .lg\\\\:prose ol { + margin-top: 1.25em; + margin-bottom: 1.25em; + } + .lg\\\\:prose ul { margin-top: 1.25em; margin-bottom: 1.25em; @@ -5202,20 +5194,13 @@ it('should generate the default classes for the typography components', async () font-weight: 600; } - .xl\\\\:prose ol { - counter-reset: list-counter; - margin-top: 1.25em; - margin-bottom: 1.25em; - } - .xl\\\\:prose ol > li { position: relative; - counter-increment: list-counter; padding-left: 1.75em; } .xl\\\\:prose ol > li::before { - content: counter(list-counter) \\".\\"; + content: counter(list-item) \\".\\"; position: absolute; font-weight: 400; color: #6b7280; @@ -5439,6 +5424,11 @@ it('should generate the default classes for the typography components', async () font-size: 0.9em; } + .xl\\\\:prose ol { + margin-top: 1.25em; + margin-bottom: 1.25em; + } + .xl\\\\:prose ul { margin-top: 1.25em; margin-bottom: 1.25em; @@ -6489,20 +6479,13 @@ it('should generate the default classes for the typography components', async () font-weight: 600; } - .\\\\32xl\\\\:prose ol { - counter-reset: list-counter; - margin-top: 1.25em; - margin-bottom: 1.25em; - } - .\\\\32xl\\\\:prose ol > li { position: relative; - counter-increment: list-counter; padding-left: 1.75em; } .\\\\32xl\\\\:prose ol > li::before { - content: counter(list-counter) \\".\\"; + content: counter(list-item) \\".\\"; position: absolute; font-weight: 400; color: #6b7280; @@ -6726,6 +6709,11 @@ it('should generate the default classes for the typography components', async () font-size: 0.9em; } + .\\\\32xl\\\\:prose ol { + margin-top: 1.25em; + margin-bottom: 1.25em; + } + .\\\\32xl\\\\:prose ul { margin-top: 1.25em; margin-bottom: 1.25em; @@ -7777,11 +7765,6 @@ it('should be possible to change the default className from `prose` to `markdown --- - - .prose ol { - + .markdown ol { - - --- - - .prose ol > li { + .markdown ol > li { @@ -7957,6 +7940,11 @@ it('should be possible to change the default className from `prose` to `markdown --- + - .prose ol { + + .markdown ol { + + --- + - .prose ul { + .markdown ul { @@ -9017,11 +9005,6 @@ it('should be possible to change the default className from `prose` to `markdown --- - - .sm\\\\:prose ol { - + .sm\\\\:markdown ol { - - --- - - .sm\\\\:prose ol > li { + .sm\\\\:markdown ol > li { @@ -9197,6 +9180,11 @@ it('should be possible to change the default className from `prose` to `markdown --- + - .sm\\\\:prose ol { + + .sm\\\\:markdown ol { + + --- + - .sm\\\\:prose ul { + .sm\\\\:markdown ul { @@ -10257,11 +10245,6 @@ it('should be possible to change the default className from `prose` to `markdown --- - - .md\\\\:prose ol { - + .md\\\\:markdown ol { - - --- - - .md\\\\:prose ol > li { + .md\\\\:markdown ol > li { @@ -10437,6 +10420,11 @@ it('should be possible to change the default className from `prose` to `markdown --- + - .md\\\\:prose ol { + + .md\\\\:markdown ol { + + --- + - .md\\\\:prose ul { + .md\\\\:markdown ul { @@ -11497,11 +11485,6 @@ it('should be possible to change the default className from `prose` to `markdown --- - - .lg\\\\:prose ol { - + .lg\\\\:markdown ol { - - --- - - .lg\\\\:prose ol > li { + .lg\\\\:markdown ol > li { @@ -11677,6 +11660,11 @@ it('should be possible to change the default className from `prose` to `markdown --- + - .lg\\\\:prose ol { + + .lg\\\\:markdown ol { + + --- + - .lg\\\\:prose ul { + .lg\\\\:markdown ul { @@ -12737,11 +12725,6 @@ it('should be possible to change the default className from `prose` to `markdown --- - - .xl\\\\:prose ol { - + .xl\\\\:markdown ol { - - --- - - .xl\\\\:prose ol > li { + .xl\\\\:markdown ol > li { @@ -12917,6 +12900,11 @@ it('should be possible to change the default className from `prose` to `markdown --- + - .xl\\\\:prose ol { + + .xl\\\\:markdown ol { + + --- + - .xl\\\\:prose ul { + .xl\\\\:markdown ul { @@ -13977,11 +13965,6 @@ it('should be possible to change the default className from `prose` to `markdown --- - - .\\\\32xl\\\\:prose ol { - + .\\\\32xl\\\\:markdown ol { - - --- - - .\\\\32xl\\\\:prose ol > li { + .\\\\32xl\\\\:markdown ol > li { @@ -14157,6 +14140,11 @@ it('should be possible to change the default className from `prose` to `markdown --- + - .\\\\32xl\\\\:prose ol { + + .\\\\32xl\\\\:markdown ol { + + --- + - .\\\\32xl\\\\:prose ul { + .\\\\32xl\\\\:markdown ul { @@ -16946,11 +16934,6 @@ it('should be possible to change the default modifiers and change the className' --- - - .prose ol { - + .markdown ol { - - --- - - .prose ol > li { + .markdown ol > li { @@ -17126,6 +17109,11 @@ it('should be possible to change the default modifiers and change the className' --- + - .prose ol { + + .markdown ol { + + --- + - .prose ul { + .markdown ul { @@ -18187,11 +18175,6 @@ it('should be possible to change the default modifiers and change the className' --- - - .sm\\\\:prose ol { - + .sm\\\\:markdown ol { - - --- - - .sm\\\\:prose ol > li { + .sm\\\\:markdown ol > li { @@ -18367,6 +18350,11 @@ it('should be possible to change the default modifiers and change the className' --- + - .sm\\\\:prose ol { + + .sm\\\\:markdown ol { + + --- + - .sm\\\\:prose ul { + .sm\\\\:markdown ul { @@ -19425,11 +19413,6 @@ it('should be possible to change the default modifiers and change the className' --- - - .md\\\\:prose ol { - + .md\\\\:markdown ol { - - --- - - .md\\\\:prose ol > li { + .md\\\\:markdown ol > li { @@ -19605,6 +19588,11 @@ it('should be possible to change the default modifiers and change the className' --- + - .md\\\\:prose ol { + + .md\\\\:markdown ol { + + --- + - .md\\\\:prose ul { + .md\\\\:markdown ul { @@ -20657,11 +20645,6 @@ it('should be possible to change the default modifiers and change the className' --- - - .lg\\\\:prose ol { - + .lg\\\\:markdown ol { - - --- - - .lg\\\\:prose ol > li { + .lg\\\\:markdown ol > li { @@ -20837,6 +20820,11 @@ it('should be possible to change the default modifiers and change the className' --- + - .lg\\\\:prose ol { + + .lg\\\\:markdown ol { + + --- + - .lg\\\\:prose ul { + .lg\\\\:markdown ul { @@ -21898,11 +21886,6 @@ it('should be possible to change the default modifiers and change the className' --- - - .xl\\\\:prose ol { - + .xl\\\\:markdown ol { - - --- - - .xl\\\\:prose ol > li { + .xl\\\\:markdown ol > li { @@ -22078,6 +22061,11 @@ it('should be possible to change the default modifiers and change the className' --- + - .xl\\\\:prose ol { + + .xl\\\\:markdown ol { + + --- + - .xl\\\\:prose ul { + .xl\\\\:markdown ul { @@ -23133,11 +23121,6 @@ it('should be possible to change the default modifiers and change the className' --- - - .\\\\32xl\\\\:prose ol { - + .\\\\32xl\\\\:markdown ol { - - --- - - .\\\\32xl\\\\:prose ol > li { + .\\\\32xl\\\\:markdown ol > li { @@ -23313,6 +23296,11 @@ it('should be possible to change the default modifiers and change the className' --- + - .\\\\32xl\\\\:prose ol { + + .\\\\32xl\\\\:markdown ol { + + --- + - .\\\\32xl\\\\:prose ul { + .\\\\32xl\\\\:markdown ul { diff --git a/src/styles.js b/src/styles.js index 93d97ee..c9f81a6 100644 --- a/src/styles.js +++ b/src/styles.js @@ -27,15 +27,11 @@ module.exports = (theme) => ({ color: theme('colors.gray.900', defaultTheme.colors.gray[900]), fontWeight: '600', }, - ol: { - counterReset: 'list-counter', - }, 'ol > li': { position: 'relative', - counterIncrement: 'list-counter', }, 'ol > li::before': { - content: 'counter(list-counter) "."', + content: 'counter(list-item) "."', position: 'absolute', fontWeight: '400', color: theme('colors.gray.500', defaultTheme.colors.gray[500]),