Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@patternfly/pfe-band
Advanced tools
This container element provides a set of slots in which to render banded content.
All slots other than pfe-band--body
are optional. If the slot is not defined, the container tag for it will not be rendered in the template.
pfe-band--header
: This slot renders at the top of the container and generally contains the title, headline, and/or subheadline content. Other possible candidates include a set of social sharing links or tags that describe the content below. The template is automatically wrapping this slot in a header
tag. Recommend using h-level or p tags inside this slot.article
tag.pfe-band--footer
: This slot is typically used for calls-to-action or footnotes and is pushed to the bottom of the container. Recommended tags include pfe-cta
. The template is automatically wrapping this slot in a footer
tag.pfe-band--aside
: This slot is for content that should be rendered to the right or left of the default slot on desktop. Asides often contain pfe-card
or interest forms which provide users a little more information or context for the band. The template is automatically wrapping this slot in an aside
tag.<pfe-band>
<h2 slot="pfe-band--header">Lighter band; no footer</h2>
<p>Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata dolor sit amet.</p>
<pfe-card slot="pfe-band--aside">
<h3 slot="pfe-card--header">Aside: left body bottom</h3>
<p>Ut wisi enim ad minim veniam.</p>
</pfe-card>
<pfe-cta slot="pfe-band--footer" priority="tertiary">
<a href="#">Learn more</a>
</pfe-cta>
</pfe-band>
There are several attributes available for customizing the visual treatment of this container.
color
: Options include darkest, darker, accent, complement, lighter, lightest. The band has a default value of #dfdfdf
. Your context will influence these colors so check there first if you are seeing inconsistencies.
color | hex |
---|---|
base/default | #f0f0f0 |
darker | #3c3f42 |
darkest | #151515 |
accent | #004080 |
complement | #002952 |
lighter | #f0f0f0 |
lightest | #ffffff |
img-src
: Optional background image applied to the entire band container. Alignment of this image can be managed using the --pfe-band--BackgroundPosition
variable which is set to center center
by default.
size
: Optionally adjusts the padding on the container. Accepts: small
.
use-grid
: This turns on a default grid inside the header, body, footer, and aside regions. The grid can be customized using the following CSS variables:
Variable name | Default |
---|---|
--pfe-band__header--layout | 1fr |
--pfe-band__header--gutter--vertical | var(--pfe-theme--container-spacer, 16px) |
--pfe-band__header--gutter--horizontal | calc(var(--pfe-theme--container-spacer, 16px) * 3) |
--pfe-band__body--layout | 1fr |
--pfe-band__body--gutter--vertical | var(--pfe-theme--container-spacer, 16px) |
--pfe-band__body--gutter--horizontal | calc(var(--pfe-theme--container-spacer, 16px) * 3) |
--pfe-band__footer--layout | 1fr |
--pfe-band__footer--gutter--vertical | var(--pfe-theme--container-spacer, 16px) |
--pfe-band__footer--gutter--horizontal | calc(var(--pfe-theme--container-spacer, 16px) * 3) |
--pfe-band__aside--layout | 1fr |
--pfe-band__aside--gutter--vertical | var(--pfe-theme--container-spacer, 16px) |
--pfe-band__aside--gutter--horizontal | calc(var(--pfe-theme--container-spacer, 16px) * 3) |
The aside settings have defaults and if no attribute is defined on the element's main tag, these attributes will be injected with their default values automatically.
aside-desktop
: This influences where the aside is rendered at the desktop view and are indicated relative to the body content. Options are right
or left
. Right is the default.aside-mobile
: This influences the position of the aside in the mobile view as well as where in the DOM the aside markup is rendered. These names are relative to the body content. Options are top
or bottom
. Bottom is the default.aside-height
: This influences the height of the aside region relative to the body content. Options are full
or body
. A full
height starts at the top of the band and spans the header, body, and footer regions. A body
height spans the body and footer regions only with the header region sitting above it in the rendered view. Body is the default.There are several powerful variables available to hook into and override default styles.
--pfe-band--Padding--vertical
and --pfe-band--Padding--horizontal
accept size values such as px, em, rem, etc.pfe-color
attribute is strongly recommended when setting the background color for the band, you can also use completely custom colors by updating the --pfe-band--BackgroundColor
variable. If you update this value manually, you should also update the --context
context variable to invoke the right context on it and it's child elements. Supported contexts include: light
, dark
, and saturated
.pfe-img-src
attribute to allow you to align your background image. Default value is center center
.use-grid
attribute details above). The regions themselves are also wrapped in a grid system that supports customization. All layouts appears "stacked" by default. Please note that the fallback for older browsers is a simple stacked layout (the aside position will be aligned using floats). Possible values include: 1fr 1fr
, repeat(3, 1fr)
, repeat(auto-fill, minmax(300px, 1fr))
. i.e., --pfe-band--layout: repeat(auto-fill, minmax(300px, 1fr));
.npm run test
npm run build
From the PFElements root directory, run:
npm dev pfe-band
Band (and all PatternFly Elements) use Prettier to auto-format JS and JSON. The style rules get applied when you commit a change. If you choose to, you can integrate your editor with Prettier to have the style rules applied on every save.
FAQs
Band container for PatternFly Elements
We found that @patternfly/pfe-band demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 16 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.