Skip to content

A Swift library that integrates swift-html-types and swift-css-types with pointfree-html.

License

Notifications You must be signed in to change notification settings

coenttb/swift-html-css-pointfree

Repository files navigation

swift-html-css-pointfree

⚠️ This is an integration package. For end-user development, please use coenttb/swift-html instead.

Overview

This package serves as an integration layer that combines:

It provides the foundational PointFree HTML integration that powers the higher-level swift-html package.

For Developers

👉 Use coenttb/swift-html for your projects.

The swift-html package provides a complete, developer-friendly API for building type-safe HTML and CSS in Swift with a SwiftUI-like syntax:

import HTML

let document = HTMLDocument {
  div {
    h1 { "Type-safe HTML" }
      .color(light: .blue, dark: .red)
      .fontSize(.px(24))
    p { "With type-safe CSS!" }
      .marginTop(.px(10))
  }
}

Package Architecture

This integration package consists of several modules:

  • HTMLElements+PointFreeHTML - PointFree HTML extensions for HTML elements
  • HTMLAttributes+PointFreeHTML - PointFree HTML extensions for HTML attributes
  • CSS+PointFreeHTML - PointFree HTML extensions for CSS properties
  • HTML+CSS+PointFreeHTML - Combined HTML and CSS functionality

Installation (Internal Use Only)

This package is typically used as a dependency by other packages in the ecosystem. If you need to use it directly:

dependencies: [
    .package(url: "https://github.com/coenttb/swift-html-css-pointfree", from: "0.0.1")
]

Related Packages

For End Users

  • swift-html - 👈 Start here! Complete Swift DSL for HTML and CSS

Foundation Packages

Contribution

Contributions are welcome! Please feel free to submit a Pull Request.

Feedback

If you have suggestions or find issues, please open a GitHub issue. Your feedback helps make this project better for everyone.

Subscribe to my newsletter

Follow me on X

Connect on LinkedIn

License

This project is licensed under the Apache 2.0 License. See LICENSE for details.

About

A Swift library that integrates swift-html-types and swift-css-types with pointfree-html.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Languages