Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepy-monax committed Dec 12, 2024
1 parent 5289455 commit ddb20cd
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 1 deletion.
28 changes: 28 additions & 0 deletions src/web/vaev-base/content.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#pragma once

#include "image.h"
#include "string.h"

namespace Vaev {

enum struct ContentKeyword {
NONE,
NORMAL,
};

enum struct Quotes {
OPEN_QUOTE,
CLOSE_QUOTE,
NO_OPEN_QUOTE,
NO_CLOSE_QUOTE,
};

using _Content = Union<
ContentKeyword,
Quotes,
StringFunc,
Image>;

struct Content : public _Content {};

} // namespace Vaev
37 changes: 37 additions & 0 deletions src/web/vaev-base/counter.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#pragma once

#include <karm-base/map.h>
#include <karm-base/string.h>

namespace Vaev::Style {

enum struct SymbolsType {
CYCLIC,
NUMERIC,
ALPHABETIC,
SYMBOLIC,
FIXED,
};

struct SymbolsFunc {
SymbolsType type;
};

struct Counter {
};

struct CounterSet {
Map<String, Counter> counters;
};

struct CounterStyle {};

struct CounterFunc {
};

struct CountersFunc {
String counter;
String sep;
};

} // namespace Vaev::Style
24 changes: 24 additions & 0 deletions src/web/vaev-base/string.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#pragma once

#include <karm-base/map.h>
#include <karm-base/string.h>

namespace Vaev {

enum struct StringKeyword {
FIRST,
START,
LAST,
FIRST_EXCEPT,
};

struct StringFunc {
String ident;
StringKeyword keyword;
};

struct StringSet {
Map<String, String> values;
};

} // namespace Vaev
2 changes: 1 addition & 1 deletion src/web/vaev-style/computer.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct Computer {

Strong<Computed> _evalCascade(Computed const &parent, MatchingRules &matches);

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

Strong<PageComputedStyle> computeFor(Computed const &parent, Page const &page);
};
Expand Down

0 comments on commit ddb20cd

Please sign in to comment.