Files
LCUI/tests/test_flex_layout.css
T
Liu e533853908 feat: update css library
feat(css): add css value definition parser

refactor(css): change the parameter types of css_parse_* functions

refactor(css): migrate to new data types

refactor(css): migrate to new data types (2)

refactor(css): migrate to new data types (3)

test: add valdef test

feat(css): add css_valdef_parser_finish()

refactor(css): split css_library.c

refactor(css): css_data_type.c -> css_data_types.c

fix(css): the parsing error message of sign is not truncated

fix(css): correct initialization of data type library

fix(css): error message should not be empty

feat(css): add css_valdef_to_string()

feat(css): add double bar combinator

feat(css): add double ampersand combinator

feat(css): add curly braces multiplier

feat(css): add brackets combinator parser

docs: update css value matcher section

feat(css): add question mark multiplier

test(css): add test for brackets combinator

docs(css): update libcss_css_value.md

docs: update directory structure

refactor: numberic -> numeric

refactor(css): delete style property parser

refactor: migrate to css property API

docs(css): add css value converter section

feat(css): add css_computed_style_t

refactor(css): rename `css_style` associated identifiers

feat(css): add css_cascade_style()

refactor(css): change type of css_value_matcher_t::value

refactor(css): update args of css_register_property()

refactor(css): move css_computed_style_t

feat(css): update opacity property

feat(css): update z-index property

feat(css): update display property

feat(css): update pointer-events property

feat(css): update flex-wrap property

feat(css): update flex-direction property

feat(css): update flex-grow property

feat(css): update flex-shrink property

feat(css): update align-items property

feat(css): update justify-content property

feat(css): update position property

feat(css): update box-sizing property

feat(css): update align-content property

feat(css): update white-space property

feat(css): update content property

feat(css): update text-align property

feat(css): automatically register new keywords

feat(css): update font-style property

feat(css): update visibility property

feat(css): update border-*-style property

refactor: update css_unit_t definition

feat(css): update border-*-*-radius properties

refactor(css): delete CSS_PERCENTAGE_VALUE

refactor(css): css_cascade_length() -> css_cascade_length_auto()

refactor(css): update enum definitions

feat(css): update border-*-width properties

feat(css): update border-*-color properties

feat(css): add css_array_value_get_length()

feat(css): add border-width shorthand property

feat(css): add border-style shorthand property

feat(css): add border-radius shorthand property

feat(css): add border-color shorthand property

feat(css): add border shorthand property

feat(css): add margin shorthand property

feat(css): add padding shorthand property

feat(css): update size related properties

feat(css): update top, right, bottom, left properties

feat(css): update flex-basis property

feat(css): update line-height property

feat(css): update color property

refactor(css): add css_cascade_bg_border_color()

refactor(css): bits -> keyword_bits

refactor(css): flag -> keyword

refactor(css): update css_color_value_t definition

feat(css): add CSS_COLOR_TRANSPARENT

refactor(css): remove transparent keyword

feat(css): update font-size property

feat(css): update font-family property

feat(css): update background shorthand property

feat(css): update vertical-align property

feat(css): update box-shadow property

feat(css): update the computing of the box-shadow property

 feat(css): update the computing of the background property

feat(css): update the computing of the border property

refactor(css): keyword_bits -> type_bits

refactor(css): enum css_*_e -> uint8_t

feat(css): add absolute size computing

feat(css): add absolute padding computing

feat(css): add absolute margin computing

style(css): format code

feat(css): add top, right, bottom, and left absolute value computing

feat(css): add flex-basis absolute value computing

refactor(ui): replace data type of computed style

feat(ui): update widget background style computing

feat(ui): update widget box-shadow style computing

feat(ui): update widget border style computing

feat(ui): update widget box computing

feat(ui): use tabindex instead of focusable

feat(css): remove focusable property

feat(css): update font-weight property

fix(css): clear compile errors

refactor(ui): adapt to new computed style data structure

refactor(ui): delete ui_widget_box_model_t

fix: clear some compiler warnings

refactor(ui): ui_font_style.c -> ui_text_style.c

feat(ui): remove unnecessary helper functions

fix: clear some compiler warnings

fix(font): correct bitmap cache access

fix(css): correct the key assignment of keywords

fix(css): some memory access errors

fix: missing NULL at the end of font names

fix: clear gcc errors

refactor: clear gcc warnings

fix(css): array subscript is above array bounds

fix(css): incorrect property name memory allocation

fix(css): style parser memory leak

fix(css): prop->valdef memory leak

refactor(css): logger_debug -> DEBUG_MSG

refactor(ui-builder): clear warnings

fix(css): css_properties.list memory leak

fix(css): css_style_link_group_create() memory leak

fix(css): incorrect keyword storage

test(css): correct color_value comparison

test: clear compiler errors

fix(css): correct the return value of css_register_keyword()

fix(css): correct integer type value parsing

chore(css): _DEBUG -> DEBUG

feat(css): add string value parsing

fix(css): correct font-family initial value

test(css): add test_css_computed.c

fix(css): value read error in css_cascade_background()

fix(css): add some missing properties

feat(css): add flex shorthand property

build: update rundir of lcui-css-test

fix(css): font-family parsing error

feat(css): style array value to string

chore(vscode): add compileCommands

fix(css): string value parsing error

fix(css): correct content property initial value

fix(css): the parsed style data is not stored correctly

fix(css): correct cascading of some properties

fix(css): percentage value parsing inccorect

fix(css): <length> should not contain <percentage>

fix(css): css_array_value_duplicate() did not copy the last value

feat(css): add visible keyword

feat(css): cascade each property in order

refactor(css): add style_decl.c

refactor(css): use css_style_decl_t instead of css_style_t

fix(css): incorrect number of resolved values

refactor(css): add css_style.c

feat(css): parse shorthand properties in the parsing phase

refactor(css): add background property parser

refactor(css): add border property parser

refactor(css): css_select_style_decl -> css_find_style_store

refactor(css): add css_select_style_with_cache()

refactor(css): add margin property parser

refactor(css): add padding property parser

refactor(css): add flex property parser

fix(ui): incorrect widget style cascading order

refactor(css): const css_propdef_t* -> css_propdef_t*

refactor(css): update arguments of shorthand property parser

fix(css): incorrect value parsing of shorthand property

fix(css): unexpected truncation while parsing color value

fix(css): correct value matching and style computing

fix(ui): correct css style operation

fix(platform): crash when closing window

refactor(css): delete file prefix

refactor(css): delete style.c

refactor(css): clear compiler warnings

refactor: update directory structure and build configuration

feat(css): add dump functions

fix(css): correct valdef parser cursor operation

fix(css): correct the definition of margin and padding

fix(css): correct flex property parsing and definition

refactor(ui): adjust the use of calculated styles in the layout engine

chore: tests/helloword -> examples/hello

fix(ui): some bugs in block layout

fix(css): correct flex property definition

refactor(ui): simplify the naming of widget style and layout diff API

refactor(ui): update reflow trigger rules

refactor(ui): ui_widget_auto_reflow -> ui_widget_reflow

feat(ui): allow multiple observers to connect to the same widget

refactor(ui): simplify widget update process

refactor(ui): adjust row processing in block layout

refactor(ui): adjust the data structure used in the flexbox layout

fix(ui): correct flex layout algorithm

build: update config
2023-04-01 22:36:07 +08:00

351 lines
4.9 KiB
CSS

textview,
body {
font-size: 14px;
line-height: 1.6;
font-family: "Ubuntu Mono", "Consola";
}
.example {
padding: 5px;
background-color: #f1f2f3;
border: 1px solid #ddd;
margin-bottom: 10px;
}
.container {
max-width: 600px;
width: 100%;
padding: 10px;
margin: 0 auto;
box-sizing: border-box;
}
.example__title {
padding: 5px;
font-size: 12px;
line-height: 22px;
}
.example__content {
padding: 5px;
background-color: #fff;
overflow: hidden;
}
.box {
width: 50px;
height: 50px;
background-color: #b8daff;
border: 1px solid #7cbbff;
box-sizing: border-box;
font-size: 12px;
padding: 5px
}
.d-inline-block {
display: inline-block;
}
.d-flex {
display: flex;
}
.d-block {
display: block;
}
.ml-auto {
margin-left: auto;
}
.mr-auto {
margin-right: auto;
}
.ml-0 {
margin-left: 0;
}
.mr-0 {
margin-right: 0;
}
.w-auto {
width: auto;
}
.h-auto {
height: auto;
}
.w-2 {
width: 100px;
}
.w-3 {
width: 150px;
}
.w-4 {
width: 200px;
}
.h-1 {
height: 50px;
}
.h-2 {
height: 100px;
}
.h-3 {
height: 150px;
}
.h-4 {
height: 200px;
}
.h-5 {
height: 250px;
}
.h-6 {
height: 300px;
}
.flex-1 {
flex: 1;
}
.flex-2 {
flex: 2;
}
.flex-4 {
flex: 4;
}
.flex-auto {
flex: auto;
}
.flex-none {
flex: none;
}
.flex-initial {
flex: initial;
}
.justify-content-center {
justify-content: center;
}
.justify-content-end {
justify-content: flex-end;
}
.justify-content-space-between {
justify-content: space-between;
}
.justify-content-space-around {
justify-content: space-around;
}
.felx-wrap {
flex-wrap: wrap;
}
.flex-direction-column {
flex-direction: column;
}
.align-items-center {
align-items: center;
}
.align-items-end {
align-items: flex-end;
}
.align-items-stretch {
align-items: stretch;
}
.example-1-flex-default .example__content {
display: flex;
}
.example-holy-grail-layout .example__content {
display: flex;
flex-direction: column;
}
.example-holy-grail-layout .box {
text-align: center;
}
.example-holy-grail-layout .layout__body {
display: flex;
flex: 1 1 auto;
}
.example-holy-grail-layout .layout__left,
.example-holy-grail-layout .layout__right {
width: 100px;
height: 100%;
flex: 0 0 auto;
}
.example-holy-grail-layout .layout__center {
flex: 1 1 auto;
height: 100%;
}
.example-browser .c-frame-tab__icon {
width: 16px;
flex: 0 0 auto;
line-height: 16px;
font-size: 16px;
margin-top: 2px;
text-align: center;
background-color: #b8daff;
border: 1px solid #7cbbff;
}
.example-browser .c-frame-tab__text {
flex: 1 1 auto;
height: 20px;
line-height: 20px;
margin: 0 8px 0 8px;
white-space: nowrap;
overflow: hidden;
}
.example-browser .c-frame-tab__close {
flex: 0 0 auto;
width: 18px;
height: 18px;
font-size: 14px;
line-height: 18px;
text-align: center;
border-radius: 8px;
margin: 2px 0 0 auto;
}
.example-browser .c-frame-tab__close:hover {
background-color: #dee2e6;
}
.example-browser .c-frame-tab__close:active {
background-color: #ced4da;
}
.example-browser .c-frame-tab {
width: 100%;
min-width: 60px;
max-width: 25%;
position: relative;
margin-right: -1px;
padding: 8px;
display: flex;
box-sizing: border-box;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
}
.example-browser .c-frame-tab:hover {
background-color: #e9ecef;
}
.example-browser .c-frame-tab.active {
background-color: #fff;
}
.example-browser .c-navbar {
display: flex;
padding: 5px 8px;
border-bottom: 1px solid #e9ecef;
}
.example-browser .v-frame {
display: flex;
flex-direction: column;
flex: 1 1 auto;
}
.example-browser .v-frame__navbar {
flex: 0 0 auto;
}
.example-browser .v-frame__client {
flex: 1 1 auto;
}
.example-browser .v-frame__content {
min-height: 100%;
box-sizing: border-box;
}
.example-browser .v-browser {
display: flex;
flex-direction: column;
height: 100%;
}
.example-browser .v-browser__tabbar {
display: flex;
flex: 0 0 auto;
align-items: flex-start;
background-color: #dee2e6;
padding: 8px 8px 0 8px;
}
.example-browser .v-browser__btn-add-tab {
width: 28px;
font-size: 18px;
line-height: 28px;
border-radius: 14px;
margin-left: 10px;
text-align: center;
margin-top: 4px;
flex: 0 0 auto;
}
.example-browser .c-navbar__input:hover {
background-color: #dee2e6;
}
.example-browser .c-navbar__input:focus {
border: 0;
background-color: #fff;
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.4);
}
.example-browser .v-browser__btn-add-tab:hover {
background-color: #ced4da;
}
.example-browser .v-browser__btn-add-tab:active {
background-color: #adb5bd;
}
.example-browser .v-home {
height: 100%;
display: flex;
align-items: center;
padding: 10px;
box-sizing: border-box;
}
.example-browser .v-home .container {
display: flex;
max-width: 256px;
width: 100%;
margin: 0 auto;
justify-content: center;
box-sizing: border-box;
}