Skip to content

Unwanted LESS calculations applied on CSS properties with "arithmetic-like" values #32

Closed
@AFaust

Description

@AFaust

When integrating JLessC as an alternative to LESS engine in the Share client of Alfresco ECM I encountered an instance where JLessC incorrectly evaluated a valid CSS property value as an arithmetic operation. This problem has affected less.js in the past (i.e. #146) as well.

The CSS specifications define some properties to allow for value expressions that look like arithmetic operations but should not be treated / evaluated as such. This affects e.g. the font or border-radius properties. In my case I have a vendor provided CSS rule

.@{alfresco}
{
   font:13px/1.231 Open Sans,arial,helvetica,clean,sans-serif;
}

that is processed by JLessC to

.alfresco-share {
  font: 10.5605199px Open Sans, arial, helvetica, clean, sans-serif;
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions