Skip to content
프로젝트

소개

Create HTML from CSS! A modern javascript library you'd expect Facebook to invent. Slowly build modern websites without ever leaving your CSS, with HeadwindHTML

웹 및 앱 개발

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

HeadwindHTML

Create HTML from CSS! A modern javascript library you'd expect Facebook to invent.

Slowly build modern websites without ever leaving your CSS, with HeadwindHTML

(note: We dropped Typescript with v0.x)

What does it do?

Try it now (Codepen)

Headwind HTML let's you write CSS instead of HTML. When the page is loaded, your css will be parsed and converted to HTML.

Normally, you would create an html link like this:

<a href="https://google.com">Text</a>

With Headwind HTML, you can create your link element directly from CSS!!

.css::after{
  --s:a;
  --s-text:"I love Headwind";
  --s-apply-href:"https://google.com";
}

Which will also reduce your HTML to this:

<script src="https://cdn.jsdelivr.net/gh/gokhanmeteerturk/HeadwindHTML/headwind.js"></script>
<div id="root" class="css"></div>

End result:

I love Headwind


Can I also apply Tailwind CSS utility classes?

Yes you can! Here is a simple html link, but with Headwind and Tailwind:

.css::after{
  --s:a;
  --s-text:"I love Headwind with Tailwind";
  --s-apply:px-4 py-3 my-2 mx-3 text-md text-white font-semibold bg-purple-600 rounded-full border
  border-purple-200 hover:text-purple-600 hover:bg-white hover:border-purple-600 focus:outline-none
  focus:ring-2 focus:ring-purple-600 focus:ring-offset-2;
  --s-apply-href:"https://google.com";
}

ss2

How to create an element tree?

You can use --s-child custom property to create child elements. Headwind will automatically create the child elements.

.css::after{
  --s:a;
  --s-text:"I love breaking";
  --s-apply:px-4 py-3 my-2 mx-3 text-md text-white font-semibold bg-purple-600 rounded-full border border-purple-200 hover:text-purple-600 hover:bg-white hover:border-purple-600 focus:outline-none focus:ring-2 focus:ring-purple-600 focus:ring-offset-2;
  --s-apply-href:"https://google.com";
  
    /* Don't let Adam Wathan see this. */
  --s-child:bold-text-element;
}

.bold-text-element::after{
  --s:b;
  --s-text:" established industry standards";
}

image

Does it use virtual DOM?

No.

Does it break your console?

Yes. Headwind HTML is so 2026 that it intentionally overrides console.error function to make your website feel modern and interactive.

Should I use it?

You should never use Headwind HTML in any kind of environment.

관련 프로젝트 살펴보기

불러오는 중…