Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[CSS]: CSS not applying corretly #1320

Open
Labels
Milestone
@relez

Description

Hi there, I am working on a ListView that highlights the elements when the user taps on a specific item. I am trying to add a CSS style to make it looks like its selected but seems like its not adding the style. This is my HTML code:

<ListView #selectListView [items]="_auxSelectItems" (itemTap)="onItemTap($event)">
 <ng-template let-item="item">
 <Label [class]="'item item-content top-left-rounded top-right-rounded bot-left-rounded bot-right-rounded ' + (this._selectedItemsCheck[item.ID] ? 'item-selected' : '')" [text]="item.Description" textWrap="true" style="padding:10;"></Label>
 </ng-template>
</ListView>

In the onItemTap event I have this code...

onItemTap(event: ItemEventData) : void {
 let lb = <Label>event.view;
 lb.cssClasses.add("font-bold");
 // also tried:
 lb.className = "font-bold";
}

The font-bold rule is defined in a css file like this:

.font-bold {
 font-weight: bold;
}

Am I missing something? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /