diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2016-02-09 16:42:28 +0000 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2016-02-09 16:42:28 +0000 |
commit | 3bee7b7e127be7b378a90569c63b82cde9fb20bc (patch) | |
tree | 5ec29fb0816765ec69fd458a26f349f833c068cf /render/box.h | |
parent | 3af77eabd8b818629bc86e8bd7e29da2cdb621ff (diff) | |
download | netsurf-3bee7b7e127be7b378a90569c63b82cde9fb20bc.tar.gz netsurf-3bee7b7e127be7b378a90569c63b82cde9fb20bc.tar.bz2 |
Layout: Don't generate :before and :after boxes for replaced elements.
In CSS 2.1 this was undefined.
CSS 2.1 -- 12.1 The :before and :after pseudo-elements
Note. This specification does not fully define the interaction
of :before and :after with replaced elements (such as IMG in HTML).
This will be defined in more detail in a future specification.
-- https://www.w3.org/TR/CSS21/generate.html#before-after-content
In CSS 3 the :before and :after generated content boxes are not allowed
on replaced elements.
CSS 3 Generated and Replaced Content Module
12. Replaced content
The box model defines different rules for the layout of replaced
elements than normal elements. Replaced elements do not have
'::before' and '::after' pseudo-elements; the 'content' property
in the case of replaced content replaces the entire contents of
the element's box.
-- https://www.w3.org/TR/css3-content/#replacedContent
Diffstat (limited to 'render/box.h')
-rw-r--r-- | render/box.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/render/box.h b/render/box.h index 1f35adad9..4ac3453aa 100644 --- a/render/box.h +++ b/render/box.h @@ -132,7 +132,8 @@ typedef enum { NEED_MIN = 1 << 8, /* minimum width is required for layout */ REPLACE_DIM = 1 << 9, /* replaced element has given dimensions */ IFRAME = 1 << 10, /* box contains an iframe */ - CONVERT_CHILDREN = 1 << 11 /* wanted children converting */ + CONVERT_CHILDREN = 1 << 11, /* wanted children converting */ + IS_REPLACED = 1 << 12 /* box is a replaced element */ } box_flags; /* Sides of a box */ |