Theme Variants

In addition to Tailwind CSS variants, there is a theme variant added in Tailwind Mobile to help make custom styles which should be different in iOS and Material theme:

Theme prefixApplied forCSS
iosiOS theme.twm-ios ...
materialMaterial theme.twm-material ...

For example:

  • Image will have height h-11 (44px) in iOS theme and h-12 (48px) in Material theme

    <img class="ios:h-11 material:h-12" src="..." />
    
  • Text will be bold in iOS theme and semibold in Material theme

    <span class="ios:font-bold material:font-semibold">Hello</span>
    
Code licensed under MIT.
2021 © Tailwind Mobile by nolimits4web.