mirror of
https://github.com/material-components/material-web.git
synced 2026-03-09 00:09:23 +08:00
47 lines
1.1 KiB
SCSS
47 lines
1.1 KiB
SCSS
//
|
|
// Copyright 2022 Google LLC
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
|
|
// stylelint-disable selector-class-pattern --
|
|
// Selector '.md3-*' should only be used in this project.
|
|
|
|
// go/keep-sorted start
|
|
@use 'sass:map';
|
|
// go/keep-sorted end
|
|
// go/keep-sorted start
|
|
@use '../../sass/theme';
|
|
@use '../../tokens';
|
|
@use './shared';
|
|
// go/keep-sorted end
|
|
|
|
@mixin styles() {
|
|
$tokens: tokens.md-comp-outlined-segmented-button-values();
|
|
// TODO(b/198759625): Remove spacing tokens once provided.
|
|
$tokens: map.merge(
|
|
$tokens,
|
|
(
|
|
'spacing-leading': 12px,
|
|
'spacing-trailing': 12px,
|
|
)
|
|
);
|
|
$tokens: shared.resolve-tokens($tokens);
|
|
$tokens: theme.create-theme-vars($tokens, 'segmented-button');
|
|
|
|
:host {
|
|
@each $token, $value in $tokens {
|
|
--_#{$token}: #{$value};
|
|
}
|
|
}
|
|
|
|
.md3-segmented-button__outline {
|
|
border-radius: inherit;
|
|
border-style: solid;
|
|
// TODO(b/233762888): Move border-width and inset into theme after generating latest version of tokens.
|
|
border-width: 1px;
|
|
inset: 0px -0.5px;
|
|
pointer-events: none;
|
|
position: absolute;
|
|
}
|
|
}
|