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.

Preflight merging/extending strategy

See original GitHub issue

I think it’s reasonable to assume one might want to expand on or modify the default Tailwind preflight but native Tailwind doesn’t currently provide a way to do this. So twind gets the luxury of doing it first! I’d like to open up a discussion about how that feature might look.

My first thought would be to possibly provide an extend key which could behave similarly to theme.extend.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
sastancommented, Jan 20, 2021

With v0.13.0 this should be written as:

Just tw.apply:

import ( setup, apply } from 'twind'

setup({
  preflight: (preflight) =>
    css(
      preflight,
      { body: apply`bg-gray-900 text-gray-100` },
    ),
})

Or using template literal:

setup({
  preflight: (preflight) => css`
      ${preflight}
      body { ${apply`bg-gray-900 text-gray-100`} }
  `
})
1reaction
sastancommented, Jan 18, 2021

Just tw.apply:

setup({
  preflight: (preflight) =>
    css(
      preflight,
      { body: tw.apply`bg-gray-900 text-gray-100` },
    ),
})

Or using template literal:

setup({
  preflight: (preflight) => css`
      ${preflight}
      body { ${tw.apply`bg-gray-900 text-gray-100`} }
  `
})
Read more comments on GitHub >

github_iconTop Results From Across the Web

Preflight - FAA
Prior to every flight, pilots should gather all information vital to the nature of the flight, assess whether the flight would be safe,...
Read more >
How Preflights Changed Our World - Scott MacLellan
Make code, create pull request, pass the preflight, merge, run CI, ... We have extended tests which require more hardware or special tools....
Read more >
Deliver Pre-Flight Checks - Slate Knowledge Base
"Warning: Recipient field does not contain a merge field", The recipient field in the message contains a static email address or addresses, ...
Read more >
Configuration and Theming - Twind
For maximum compatibility and ease of adoption, theming in Twind works exactly the same as theming in Tailwind. Here is an example of...
Read more >
kubeadm init phase | Kubernetes
Run pre-flight checks for kubeadm init using a config file. kubeadm ... "patchtype" can be one of "strategic", "merge" or "json" and they ......
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