Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepy-monax committed Dec 2, 2024
1 parent a5b8438 commit 83e9c71
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
45 changes: 45 additions & 0 deletions src/web/vaev-base/page.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#pragma once

namespace Vaev {

// https://drafts.csswg.org/css-page/#marks
enum struct PageMarks {
NONE,
CROSS,
BOX,
};

// https://drafts.csswg.org/css-page/#margin-boxes
enum struct PageMargin {
NONE,

TOP_LEFT_CORNER,
TOP_LEFT,
TOP_CENTER,
TOP_RIGHT,
TOP_RIGHT_CORNER,
RIGHT_TOP,
RIGHT_MIDDLE,
RIGHT_BOTTOM,
BOTTOM_RIGHT_CORNER,
BOTTOM_RIGHT,
BOTTOM_CENTER,
BOTTOM_LEFT,
BOTTOM_LEFT_CORNER,
LEFT_BOTTOM,
LEFT_MIDDLE,
LEFT_TOP,

_LEN,
};

// https://drafts.csswg.org/css-page/#page-orientation-prop
enum struct PageOrientation {
UPRIGHT,
ROTATE_LEFT,
ROTATE_RIGHT,

_LEN
};

} // namespace Vaev
4 changes: 4 additions & 0 deletions src/web/vaev-style/computer.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ struct Computer {
void _evalRule(Rule const &rule, Markup::Element const &el, MatchingRules &matches);

Strong<Computed> computeFor(Computed const &parent, Markup::Element const &el);

Strong<Computed> computeForPage(Markup::Element const &el);


};

} // namespace Vaev::Style

0 comments on commit 83e9c71

Please sign in to comment.