Apidog Markdown
  1. Basic Syntax and Features
Apidog Markdown
  • Welcome to Apidog Markdown
  • Basic Syntax and Features
    • Title and Text
    • Lists & Tables
    • Image
    • Video
    • Code
    • Icon
    • Tailwind CSS Supports
  • Components
    • Admonition
    • Hightlight
    • Accordion
    • AccordionGroup
    • Multiple Columns
    • Card
    • Card Group
    • Image Frame
    • Step
    • Tab
    • Tip
    • Copy to Clipboard
    • Text Hover Tip
    • Text Drawing - Mermaid
      • Graph
      • Sequence Diagram
      • Class Digram
      • State Diagram
      • Entity Relationship Diagram
      • Journey Map
      • Gantt Chart
      • Pie Chart
    • Formula
      • Inline Formula
      • Block-level Formula
  • Other Questions
    • Shortcuts
  1. Basic Syntax and Features

Tailwind CSS Supports

The content in Apidog Markdown can directly use TailwindCSS styles. The currently supported version of TailwindCSS is 3.4.1.

Tailwind CSS Concepts#

Tailwind CSS is a utility-first CSS framework, which is different from traditional component-based or predefined style frameworks (like Bootstrap, Foundation, etc.). Tailwind provides a rich set of atomic-level CSS classes, allowing developers to build custom designs directly in HTML without writing any new CSS. This approach can greatly improve development efficiency, reduce code complexity, and make styles easier to maintain and modify.

Advantages of Tailwind CSS#

1.
Atomic Design: The CSS classes provided by Tailwind are atomic-level and can be directly used in HTML without writing additional CSS.
2.
Customizability: Developers can customize configurations according to project needs, including colors, spacing, font sizes, etc.
3.
Responsive Design: Tailwind has built-in responsive breakpoints, making it easy to achieve responsive design.
4.
Reduced CSS Redundancy: Tailwind's utility-first approach can reduce redundant CSS rules, making CSS easier to manage and maintain.
5.
Compatibility with Existing Projects: Tailwind can be easily integrated into existing projects and used with any existing CSS or JavaScript frameworks.

Common Usage Examples of Tailwind CSS#

1.
Set Element Colors and Backgrounds
Using classes with bg- and text- prefixes can set an element's background color and text color. For example:
This is a blue box with white text
Code:
2.
Adjust Size and Spacing of Elements
Using classes with w-, h-, p-, m- prefixes can adjust an element's width, height, padding, and margin. For example:
This is a box with specified width, height, padding, and margin
Code:
3.
Implement Responsive Design
Using breakpoint prefixes like sm:, md:, lg:, xl:, you can adjust styles based on screen size. For example:
This box will resize based on screen size
Code:
4.
Add Shadows and Borders
Using classes with shadow- and border- prefixes can add shadows and borders to elements. For example:
5.
Text Alignment and Font Size
Using classes with the text- prefix can set text alignment and font size. For example:
This is centered, extra-large, and bold text
Code:
6.
Dark Mode Support
Tailwind supports dark mode and can change styles using the dark: prefix in dark mode. For example:
This text and background color will change in dark mode
Code:
7.
Using Tailwind within Components
Components like Accordion, Accordion Group, Card, Card Group, Step, Tip, Highlight, etc., all support using Tailwind.
The quick brown fox jumps over the lazy dog
The quick brown fox jumps over the lazy dog
image.png
The quick brown fox jumps over the lazy dog
The quick brown fox jumps over the lazy dog
image.png
Code:
<Columns>
    <Column className="bg-gray-100 p-3 rounded">
        <p className="text-lg font-bold text-pink-500">
            The quick brown fox jumps over the lazy dog
        </p>
        The quick brown fox jumps over the lazy dog
        
        ![image.png](https://api.apidog.com/api/v1/projects/550276/resources/341101/image-preview)
    </Column>
    <Column className="bg-gray-100 p-3 rounded">
        <p class="text-lg font-bold text-orange-500">
            The quick brown fox jumps over the lazy dog
        </p>
        The quick brown fox jumps over the lazy dog
        
        ![image.png](https://api.apidog.com/api/v1/projects/550276/resources/341101/image-preview)
    </Column>
</Columns>
The above are some basic concepts, advantages, and common usage examples of Tailwind CSS. By using these practical CSS classes in Apifox Markdown, developers can write clear and maintainable style code more efficiently.
Previous
Icon
Next
Admonition
Built with