PDA

View Full Version : CSS Property Selectors



pauln
2021-09-21, 04:08
Hi All

I just need to know what the "1" is in _formitem_data="1"? Like when would you use a "2" or "3"...
Does anyone have an example?

This from another Barry post:

A "Field" is comprised of a "Label" and "Data". It is known as a "Formitem". There are CSS selectors for the formitem container and its children which are the label and data:

lianja_ui_section_formitem="1"
lianja_ui_section_formitem_label="1"
lianja_ui_section_formitem_data="1"

The section that they are inside can be skinned using these selectors:

lianja_ui_section_menu="1"
lianja_ui_section_panel="1"
lianja_ui_section_footer="1"

The page containing sections has these selectors:

lianja_ui_page="1"
lianja_ui_page_header="1"
lianja_ui_page_panel="1"
lianja_ui_page_footer="1"

Thanks in advance, Paul.

yvonne.milne
2021-09-22, 11:03
Hi Paul,

"1" is true. This is an older syntax format. See the online documentation for CSS Type Selectors (https://www.lianja.com/doc/index.php/CSS#Type_Selectors).

Regards,

Yvonne

pauln
2021-09-22, 18:56
Hi Yvonne
So this makes sense from the Doc which I had read:

[user_attr1="16"] {
color:blue;
}

But what is this implying?

lianja_ui_section_menu="1"

...That if a menu section exists?
If "1" is true then only other value is "0" false (does not exisit) right?

Also below here we are calling all dividers:

*[lianja_ui_section_formitem_divider="1"] {
background:darkred;
color:yellow;
}

How do you refer to 1 particular divider if you had 3?

Thanks Paul

barrymavin
2021-09-22, 23:33
Hi Paul,

Firstly be aware that these css selectors are only for desktop apps,

Lianja sets those properties in the UI elements to 1. They are built in.

Those css selectors are from a while back and have been superseded by css class names.

What exactly are you wanting to achieve?

pauln
2021-09-23, 07:24
Hi Barry
"Desktop Apps" ah yes I did read that but was bleary eyed at the time.

I am working through each sample APP and studying the intricate parts and pulling design bits I may need to build my prototype.
While understanding CSS I just got stuck on this. It's a moot point as direction is really Cloud.

Would it be fair to say that I should just rely on the pre-defined CSS templates provided with Linaja?
I do like the idea of being able to change the skin (look and feel) of an APP - light theme/dark theme.

Thanks PAul.

barrymavin
2021-09-23, 23:15
Hi Paul,

The html that is generated together with the Lianja web framework adjusts for various resolutions. It is better to use what is provided. If you need to customize appearance use attributes whenever possible.

I would recommend producing a minimal viable product (MVP) first then refine it afterwards.