Gradient To Top
Gradient To Bottom
Gradient To Left
Gradient To Right
import { ChangeDetectionStrategy, Component } from '@angular/core';
@Component({
selector: 'porsche-design-system-app',
styles: [
`
@use '@porsche-design-system/components-angular/styles' as *;
// Wrapper
.wrapper {
display: flex;
flex-wrap: wrap;
justify-content: center;
grid-gap: $pds-grid-gap;
padding: $pds-spacing-fluid-medium;
background: radial-gradient(circle, rgba(238, 174, 202, 1) 0%, rgba(148, 187, 233, 1) 100%);
}
// Tile
.tile {
@include pds-text-small;
color: $pds-theme-dark-primary;
border-radius: $pds-border-radius-large;
padding: $pds-spacing-fluid-medium;
}
// Gradient
.gradient-to-top {
@include pds-gradient-to-top;
}
.gradient-to-bottom {
@include pds-gradient-to-bottom;
}
.gradient-to-left {
@include pds-gradient-to-left;
}
.gradient-to-right {
@include pds-gradient-to-right;
}
`,
],
template: `
<div class="wrapper">
<div class="gradient-to-top tile">Gradient To Top</div>
<div class="gradient-to-bottom tile">Gradient To Bottom</div>
<div class="gradient-to-left tile">Gradient To Left</div>
<div class="gradient-to-right tile">Gradient To Right</div>
</div>
`,
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class ExampleComponent {}
JavaScript
and SCSS
version. Look at the example above to see how the styles work.JSS
, styled-components
etc. JavaScript styles can be imported by:
import { … } from '@porsche-design-system/components-{js|angular|react|vue}/styles';
.vanilla-extract
JavaScript styles can be imported by:
import { … } from '@porsche-design-system/components-{js|angular|react|vue}/styles/vanilla-extract';
.gradientToBottomStyle
gradientToLeftStyle
gradientToRightStyle
gradientToTopStyle
@use '@porsche-design-system/components-{js|angular|react|vue}/styles' as *;
@mixin pds-gradient-to-bottom()
@mixin pds-gradient-to-left()
@mixin pds-gradient-to-right()
@mixin pds-gradient-to-top()