承接 row-bloom/css-length 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

row-bloom/css-length

最新稳定版本:v0.5.0

Composer 安装命令:

composer require row-bloom/css-length

包简介

Standard CSS sizing

关键字:

README 文档

README

Latest Version on Packagist Total Downloads Pest Action Pint action

Value objects and enums to manipulate CSS lengths and ensure valid values in your PHP code.

Important

This is a sub-split, for development, pull requests and issues, visit: https://github.com/row-bloom/row-bloom

This package adheres to the CSS Values and Units Module Level 3 Candidate Recommendation, particularly focusing on length values. It also encompasses related elements like standard paper sizes and facets of the box model, providing cohesive support for length applications.

Notably, it proves particularly beneficial for tasks involving PDF generation from HTML.

Installation

composer require row-bloom/css-length

Requirements

  • PHP 8.1

Usage

LengthUnit enum

  • An enum of absolute and relative length units.
  • Absolute units are px, pc, pt, mm, cm, in.
  • Relative units (todo).
  • Provides absolute units equivalence using absoluteUnitsEquivalence static method.

Length object

  • Create value object by parsing a dimension string or providing a pair of value and unit.

BoxArea object

  • Value object for representing Padding areas, Margin areas, and border areas.
  • Create and object by providing a valid CSS value string.
  • Access value of each of the for sides (top, right, bottom, left).

BoxSize object

Encompasses a pair of width and height.

PaperFormat enum

  • ISO 216:2007 A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10.
  • ISO 269:1985 C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10.
  • ASME Y14.1-2020 US Paper Sizes LETTER, LEGAL, LEDGER, TABLOID.

Precede any official paper format name with an underscore to get the enum case.

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-12-31