Comments (2)
from xng-breadcrumb.
Installed "xng-breadcrumb": "^11.0.0",
into a fresh Angular 18 project.
Everything seems working except that the xng-breadcrumb class names can't be selected on CSS even with ::ng-deep
and with or increased specificity (i.e. adding class into <xng-breadcrumb>
).
Example template:
(app.component.html)
<div class="max-screen-width mx-auto py-f-m">
<xng-breadcrumb class="my-xng-breadcrumb" [separator]="iconTemplate">
<ng-container *xngBreadcrumbItem="let breadcrumb; let first = first">
<ng-container>
@if (first) {
<span class="iconify material-symbols--home"></span>
<span class="sr-only">{{ breadcrumb }}</span>
} @else {
{{ breadcrumb }}
}
</ng-container>
</ng-container>
</xng-breadcrumb>
<ng-template #iconTemplate>
<span class="iconify material-symbols--chevron-right" aria-hidden="true"></span>
</ng-template>
</div>
(app.component.css)
/* BUG: xng-class selectors below do not work with or without ::ng-deep.
See https://udayvunnam.github.io/xng-breadcrumb/#/custom-styles
For now, overriding styles directly on index.html */
::ng-deep {
/** Even increased specificity here is not working */
.my-xng-breadcrumb {
.xng-breadcrumb-separator:first-child {
display: none;
}
.xng-breadcrumb-separator {
margin: 0;
background-color: red;
}
}
}
Nothing is selected successfully.
I don't know if there must be something done here to make it work on Angular 18 or I'm missing something in the docs so I'm reporting it here.
Adding encapsulation: ViewEncapsulation.None
does not help as well.
For now, I wrote my styles directly into index.html
for it to work.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>MyApp</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<!-- HACK: ::ng-deep + xng-breadcrumb class selectors doesn't work on Component level css. -->
<style>
.xng-breadcrumb-separator:first-child {
display: none;
}
.xng-breadcrumb-separator {
margin: 0 !important;
}
</style>
</head>
<body>
<app-root></app-root>
</body>
</html>
from xng-breadcrumb.
Related Issues (20)
- Module not found when using BreadcrumbService from another module in which the BreadCrumbsModule is imported HOT 2
- Set multiple breadcrumbs regardless of route HOT 11
- Need docs! HOT 2
- xng-breadcrumb not working in Angular Ionic HOT 2
- Hiding the breadcrumbs with one level only HOT 3
- Breadcrumb doesn't work on routes using `matcher` HOT 5
- Property '"autoGenerate"' is incompatible with index signature. HOT 3
- Double rendering with provideClientHydratation Angular 16 HOT 4
- Customizing breadcrumb HOT 3
- Breadcrumb Links Not Working HOT 4
- Breadcrumb labels no longer working with loadChildren HOT 5
- Duplicate breadcrumbs on Angular 17 HOT 6
- Support for Angular 17 HOT 16
- Typo in Dynamic breadcrumbs example HOT 1
- Custom aria-label for accessibility in other languages HOT 2
- Breadcrumb temporarily disappears during resolver data loading HOT 2
- Angular 17: Module '"xng-breadcrumb"' has no exported member 'BreadcrumbModule'. HOT 10
- Breadcrumb displays ** when same component is navigated reclusively using route config - path: '**'. Breadcrumb on UI doesn't update event after using breadcrumbService.set('@alias', 'updated Value') HOT 1
- Breadcrumb is not shown for routes that use matcher instead of path
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xng-breadcrumb.