python css声明计算机

cssdecl的Python项目详细描述


`` cssdecl`` python css声明计算机
-----------------------------

从cssdecl导入CSS22Resolver
>;>;resolve=CSS22Resolver()。resolve_string
>;>;resolve('font-size:10pt;font size:12pt')
{'font-size':'12pt'}

*展开缩写,如“border width:0 5pt”

>;>;resolved=resolve('border-width:0 5pt')
>;>已解析.pop('border-left-width')
'5pt'
>;>>已解析.pop('border-right-width')
'5pt'
>;>>已解析.pop('border-bottom-width')
'0pt'
>;>已解析.pop('border-top-width')
'0pt'
>;>已解析
{}

*(待办事项!)将类似“FONT:5px sans-serif-bold”的缩写扩展为“FONT FAMILY:sans-serif”、“FONT SIZE:5px”、“FONT WEIGHT:bold”
*将大小解析为公共单位(即pt)

>;>;resolve(“FONT-SIZE:20px”)
{FONT-SIZE:“15pt”}
>;>;resolve(“FONT-SIZE:1em”)
{FONT-SIZE:“12pt”}
>;>;resolve('FONT-SIZE:1em',inherited={'FONT-SIZE':'20pt'})
{'FONT-SIZE':'20pt'}
>;>;resolve('FONT-SIZE:small')
{'FONT-SIZE':'9.600000pt'}

*resolve`inherit`给定一些继承的声明

>;>;resolve('color:red;color:inherit',继承的={'color':'blue'})
{'color':'blue'}


CSS 2.2中的一些不速记的属性在CSS 3中变成了
速记,例如“文本装饰”因此,我们希望提供:类:`cssdecl.css22resolver`和:类:`cssdecl.css3resolver`.

此模块不*处理css选择器(例如,```` some id>;*>;div.some-class``),以及它们对元素的适用性,包括特殊性(例如,``)!重要的``.

这是首次开发用于Pandas的` `#15530<;https://github.com/Pandas dev/Pandas/pull/15530>;` ` ` ` `.
在没有其他明确的用例的情况下,将继续优先考虑问题以改进CSS支持。


_熊猫:http://pandas.pydata.org



…| py版本image::https://img.shields.io/pypi/py versions/django.svg
:alt:支持的python版本

…|版本图像::https://badge.fury.io/py/cssdecl.svg
:alt:pypi上的最新版本
:目标:https://badge.fury.io/py/cssdecl

|构建图像::https://travis-ci.org/jnothman/cssdecl.svg?branch=master
:alt:travis ci build status
:scale:100%
:target:https://travis ci.org/jnothman/cssdecl

。|覆盖率|图像::https://coveralls.io/repos/github/jnothman/cssdecl/badge.svg
:alt:Test coverage
:目标:https://coveralls.io/github/jnothman/cssdecl

|文档图片:https://readthedocs.org/projects/cssdecl/badge/?版本=最新
:alt:文档状态
:比例:100%
:目标:https://cssdecl.readthedocs.io/en/latest/?徽章=最新

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Java中ArrayList的超简单问题   Java 8在一段时间后过期   java如何创建具有用户定义维度的矩阵,并使用从上到下、从左到右的递增值填充它?   java从JDBC重启mysql   带有sqlite的java LiveData未更新UI   带有JDialog的java小程序在Mac OSX中未正确隐藏   java ActionListener无法从公共类引用数组?   java Apache Digester:NoSuchMethodException:没有这样的可访问方法   安卓中数据库中的java数据没有以正确的格式检索   java快速排序实现:使用random pivot时几乎排序   安卓 Java:高效的ArrayList过滤?   java如何在单独的文件中制作GUI程序   jasper报告如何从JSP或Java代码在JasperReport中传递参数值?