Open In App
Related Articles

Tailwind CSS Stroke

Improve Article
Improve
Save Article
Save
Like Article
Like

This class accepts lots of value in tailwind CSS in which all the properties are covered in class form. It is the stroke class to be applied to the SVG element. In CSS, we used Stroke Property.

Stroke Classes:

  • stroke-current: This class is used to set the stroke color of an SVG to the current text color. This makes it easy to set an element’s stroke color by combining this class with an existing text color utility.

Syntax:

<svg class="stroke-current">...</svg>

Example:

HTML




<!DOCTYPE html> 
<html
<head
    <link href
"https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
        rel="stylesheet"
</head
  
<body class="text-center mx-4 space-y-2"
    <h1 class="text-green-600 text-5xl font-bold"
        GeeksforGeeks 
    </h1
    <b>Tailwind CSS Stroke Class</b
    <div class="bg-green-900 m-4 grid grid-flow-col gap-4 p-5"
        <svg height="150px" width="600px"
      xmlns="http://www.w3.org/2000/svg"
      version="1.1"
      <circle class="stroke-current text-red-600" cx="100"
        cy="70" r="50" /> 
      <circle class="stroke-current text-green-600" cx="250"
        cy="70" r="50" /> 
      <circle class="stroke-current text-blue-600" cx="400"
        cy="70" r="50" /> 
      <circle class="stroke-current text-yellow-600" cx="550"
        cy="70" r="50" /> 
    </svg
    </div
</body
  
</html


Output:

stroke class


Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 22 Mar, 2021
Like Article
Save Article
Previous
Next
Similar Reads
Complete Tutorials