summaryrefslogtreecommitdiff
path: root/src/select/mq.h
Commit message (Collapse)AuthorAgeFilesLines
* Select: MQ: Support prefers-color-scheme in boolean contextMichael Drake2022-08-281-4/+5
| | | | | In boolean context it indicates that the browser supports this feature.
* Select: MQ: Use interned strings for media featuresMichael Drake2022-08-281-11/+25
| | | | Avoids some strcmps.
* Selection: Media queries: Apply prefers-color-schemeMichael Drake2022-07-311-0/+33
|
* Selection: Don't duplicate unit conversion members in media descriptor.Michael Drake2021-05-191-21/+34
|
* Units: Add support for length unit conversion to libcss.Michael Drake2021-05-191-96/+7
| | | | Currently only used for unit conversion.
* Units: Remove units that nobody supports.Michael Drake2021-05-191-11/+0
|
* select: Split out bytecode to unit conversion helper.Michael Drake2020-12-041-2/+1
|
* select: mq: Fix to convert parse unit types to public unit types.Michael Drake2020-12-011-4/+9
|
* Media queries: Simplify parsed mq data structure slightly.Michael Drake2019-06-111-7/+5
|
* Media queries: Feature matching: Compare lengths in pixels.Michael Drake2019-05-071-39/+141
| | | | | | | | Clients now provide viewport dimensions in pixels. LibCSS can now convert the units from the stylesheet to pixels. Client must also provide default font size and line height for handling viewport and root element relative sizes.
* Media queries: Start implementing feature matching.Michael Drake2019-05-061-5/+85
| | | | | | | | | | | | Currently we just look at: - width - height TODO: - Unit conversion - Use interned string comparison
* Fix typo in assertion.Michael Drake2019-05-051-1/+1
|
* Media queries: Selection: Start implementing mq matching.Michael Drake2019-05-051-8/+60
|
* Media queries: Update selection API to support media queries.Michael Drake2019-05-041-3/+3
| | | | | | | | | | | | | | | | | | | | | The API changes are: 1. When building a selection context, stylesheets added with `css_select_ctx_{append|insert}_sheet()` now have to have media strings associcated with them. Previously they took a simple bitfield for CSS media type. 2. When selecting for an element, the client needs to specify the current media requirements. Previously it only had to provide the bitfield for CSS media type. 3. Same for the css_select_font_faces API. The selection handling has been updated to handle the new API, however it is currently only looking at the media type when performing selection. Signed-off-by: Michael Drake <michael.drake@codethink.co.uk>
* Media queries: Fix documentation typo.Michael Drake2019-05-041-1/+1
| | | | Signed-off-by: Michael Drake <michael.drake@codethink.co.uk>
* Media queries: Selection: For now, we just say the condition matches.Michael Drake2019-05-041-1/+2
| | | | Signed-off-by: Michael Drake <michael.drake@codethink.co.uk>
* Media Queries: Update rule_good_for_media for new mq struct.Michael Drake2019-03-101-6/+44
| | | | | Doesn't currently match media query conditions, only the media type.
* Selection: Unify rule good for media helper.Michael Drake2018-07-271-0/+43