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/?徽章=最新
-----------------------------
从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/?徽章=最新