Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
@material/touch-target
Advanced tools
Touch target mixins and variables for Material Components for the web
Touch targets are the parts of the screen that respond to user input. They extend beyond the visual bounds of an element. For example, a button may appear to be 48 x 36 px, but the padding surrounding it comprises the full 48 x 48 px touch target.
Material Design spec states that touch targets should be at least 48 x 48 px. The MDC Web library provides mixins and guidance on adding an increased touch target for the following components:
npm install @material/touch-target
For a given button component:
<button class="mdc-button">
<div class="mdc-button__ripple"></div>
<span class="mdc-button__label">My Inaccessible Button</span>
</button>
You would add an increased touch target as follows:
<div class="mdc-touch-target-wrapper">
<button class="mdc-button mdc-button--touch">
<div class="mdc-button__ripple"></div>
<div class="mdc-button__touch"></div>
<span class="mdc-button__label">My Accessible Button</span>
</button>
</div>
Note that the outer mdc-touch-target-wrapper
element is only necessary if you want to avoid potentially overlapping touch targets on adjacent elements (due to collapsing margins).
@use "@material/touch-target/mdc-touch-target";
Mixin | Description |
---|---|
wrapper | Applied to the wrapper touch target element. |
touch-target | Applied to the inner touch target element. |
margin | Applied to the component root element. Adds margin to compensate for the increased touch target. |
13.0.0 (2021-09-24)
mdc-button
. (15981e9)theme-mixin
. (0de2f2e)action-<state>-label-text-color
values from MDC light-theme
map. (d97f8f1)innerHTML
with firstChild
(37d4db8)focusout
handler. Ensures that interactive tooltips remain open when ChromeVox uses linear navigation to read non-focusable content inside the tooltip. (7c96e6b).mdc-icon-button--display-flex
class that centers icon via flexbox. When using the new theme API, the icon button should have this class. (8355e14)validate-theme-keys()
mixin to validate theme keys only (457d89a)menu: Adds new menu adapter method:
/**
PiperOrigin-RevId: 398575780
_index
Sass module will only export theme mixins.PiperOrigin-RevId: 391773229
validate-keys()
to validate-theme()
in @material/theme
PiperOrigin-RevId: 390671152
PiperOrigin-RevId: 387378201
FAQs
Touch target mixins and variables for Material Components for the web
The npm package @material/touch-target receives a total of 301,014 weekly downloads. As such, @material/touch-target popularity was classified as popular.
We found that @material/touch-target demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 15 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.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.