question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How do I use plugins to set default list style?

See original GitHub issue

I’m using a third-party component which renders <ul><li>Stuff in here</li></ul> with no classes or id associated. I wanted to set the default list style that tailwind erases in base style to disc.

I tried doing this:

plugins: [({ addUtilities }) => addUtilities({ 'ul > li': { listStyleType: 'disc' } })],

But I must be misunderstanding how to use these methods because this and everything I’ve tried have not worked.

Am I on the right track or way off? What am I missing? (using 1.7.0)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
fvanwijkcommented, Aug 7, 2020

You can do import 'twin.macro'; if you are using tw as prop instead of template function

1reaction
tettoffensivecommented, Aug 7, 2020

Turns out to be an import issue. I had never used the syntax tw="my-class" before. Always did css={tw`my-class`} (because I didn’t know about the former).

In either case, I must import tw from 'twin.macro'; for the classes to be applied. I didn’t notice because there’s no complaint of missing import when using tw=

But when using tw= and import tw from 'twin.macro'; TypeScript does complain that 'tw' is declared but its value is never read.ts(6133).

(Hope that wasn’t too confusing)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Styling Lists with CSS - WordPress Codex
By default, most lists (and some list items) in WordPress are identified by id or class attributes, making styling lists easy. With fairly...
Read more >
How to specifiy default CSS class for list <ul> in TinyMCE?
1 Answer 1 · Style the default ul and ol in your CSS (put class_a styles into them, without class applied) · Add...
Read more >
WordPress Default CSS Styles
We specify which classes and attributes to use in our template files, ... Then include this set of default styles and fine-tune as...
Read more >
How can I change default list style? - LaTeX Stack Exchange
If you'd like to make the change globally, you can use the \setlist feature provided by enumitem \documentclass{mwrep} \usepackage{enumitem} ...
Read more >
List Block – WordPress.com Support
The List block has the following options in its toolbar: Change block type. Drag the block. Move the block up or down. Unordered...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found