sass 相关问题

Sass(Syntactically Awesome Style Sheets)是CSS的扩展,添加了嵌套规则,变量,mixins和类扩展等功能。这使开发人员能够编写结构化,可管理且可重用的CSS。 Sass被编译成标准CSS。

有没有办法在React应用程序的vite库模式下导出样式?

我有一个带有 JSX 组件、mudule.scss 和全局 css 文件的 vite React TS 应用程序。 当我使用库模式构建它时,我得到了分离的 .js、.d.ts 和 .css。 但是当我将其安装在任何其他应用程序中时,

回答 1 投票 0

Bit.dev如何创建scss组件?

我尝试创建一个bit.dev scss。我正在使用这个命令,但它不起作用。 位创建 scss 变量/颜色

回答 1 投票 0

如何创建下载按钮

我的下载按钮不起作用,我将鼠标悬停在它上面,它会在屏幕左下角显示下载链接,但我单击它,动画会播放,但不会开始下载。 这是 html...

回答 1 投票 0

更改材质设计中的复选框勾选颜色

在角度中,我试图将复选框代码和输入值下划线更改为绿色,而不是默认的紫色。 我怎样才能解决这个问题? 在角度中,我试图将复选框代码和输入值下划线更改为绿色,而不是默认的紫色。 我该如何解决这个问题? <div class="label-input-block top-centre-form"> <mat-form-field class="green-input" name="gadsCustomerId" formControlName="gadsCustomerId" id="gadsCustomerId"> <mat-label>Select accounts</mat-label> <mat-select [formControl]="selectedCidList" multiple> <mat-option *ngFor="let cid of customer_list" [value]="cid.id"> {{ cid.account_name }} [{{ cid.id }}] </mat-option> </mat-select> </mat-form-field> </div> <ng-template matStepLabel>Configure date range</ng-template> <div class="label-input-block top-centre-form"> <mat-form-field class="green-input"> <mat-label class="green-input">From Days Ago</mat-label> <input type="number" class="green-input" name="fromDaysAgo" formControlName="fromDaysAgo" id="fromDaysAgo" matInput /> </mat-form-field> </div> https://imgur.com/a/1deeM0L https://imgur.com/a/fFJJOxM 请通读 angular-material theming documentation 这包含为您的角度材质组件主题化的完美说明,目前,下面是我使用 green-palette 将所有组件设置为绿色主题时的工作示例。这将帮助您达成最终解决方案! 主题 ... $theme-primary: mat.define-palette(mat.$green-palette); $theme-accent: mat.define-palette(mat.$green-palette); ... 完整主题scss // Custom Theming for Angular Material // For more information: https://material.angular.io/guide/theming @use '@angular/material' as mat; // Plus imports for other components in your app. // Include the common styles for Angular Material. We include this here so that you only // have to load a single css file for Angular Material in your app. // Be sure that you only ever include this mixin once! @include mat.core(); // Define the palettes for your theme using the Material Design palettes available in palette.scss // (imported above). For each palette, you can optionally specify a default, lighter, and darker // hue. Available color palettes: https://material.io/design/color/ $theme-primary: mat.define-palette(mat.$green-palette); $theme-accent: mat.define-palette(mat.$green-palette); // you can also do below // $theme-accent: mat.define-palette(mat.$green-palette, A200, A100, A400); // The warn palette is optional (defaults to red). $theme-warn: mat.define-palette(mat.$red-palette); // Create the theme object. A theme consists of configurations for individual // theming systems such as "color" or "typography". $theme: mat.define-light-theme( ( color: ( primary: $theme-primary, accent: $theme-accent, warn: $theme-warn, ), typography: mat.define-typography-config(), ) ); // Include theme styles for core and each component used in your app. // Alternatively, you can import and @include the theme mixins for each component // that you are using. @include mat.all-component-themes($theme); html <div class="label-input-block top-centre-form"> <mat-form-field class="green-input" name="gadsCustomerId" id="gadsCustomerId"> <mat-label>Select accounts</mat-label> <mat-select multiple> <mat-option *ngFor="let cid of customer_list" [value]="cid.id"> {{ cid.account_name }} [{{ cid.id }}] </mat-option> </mat-select> </mat-form-field> </div> <div class="label-input-block top-centre-form"> <mat-form-field class="green-input"> <mat-label class="green-input">From Days Ago</mat-label> <input type="number" class="green-input" name="fromDaysAgo" id="fromDaysAgo" matInput /> </mat-form-field> </div> <mat-label class="green-input">checkbox</mat-label> <mat-checkbox class="example-margin">Check me!</mat-checkbox> 堆栈闪电战

回答 1 投票 0

对 <tbody> 的展开/折叠进行动画处理:寻求一些 CSS 魔法

我目前正在开发一个项目,在该项目中,我可以使用 JavaScript 成功地显示和隐藏表中的一个元素。然而,我希望为用户体验增添更多的魅力。 ...

回答 1 投票 0

当 sass 一起使用 calc 和 var 时,React 构建失败

我正在使用 create-react-app 来构建我的应用程序,当我在开发模式下运行它时,它可以正常工作,没有任何错误或警告。当我在 sass 中同时使用 calc 和 var 时,我得到了一个 b...

回答 4 投票 0

我正在尝试从JS获取幻灯片图像并在SCSS中调整它们的大小

JS 中的幻灯片图像被放大到超出屏幕的参考范围。我正在尝试调整 SCSS 中的上述图像的大小以适合所有类型的屏幕。请耐心等待,因为我仍在学习......

回答 1 投票 0

如何使用 Bootstrap 5 设置对角线背景样式?

使用 Bootstrap 5 和 (s)css 时如何创建对角样式背景(如下面的屏幕截图所示)? 理想情况下,可以与记录的其他 Bootstrap 后台实用程序很好地配合使用...

回答 1 投票 0

为什么CUDA内核的开头有一个未使用的数据移动?

我正在尝试研究从非常基本的 CUDA 内核生成的 SASS 文件。这是内核: __global__ void 内核(const float * x, 浮动*y, 常量...

回答 1 投票 0

如何在原始CSS中实现SASS颜色函数

SASS 具有可以在给定一些变量作为输入的情况下计算新颜色的函数。具体来说,我正在使用: https://sass-lang.com/documentation/modules/color/#mix https://sass-lang.com/documentation/

回答 1 投票 0

如何为深色模式制作自定义谷歌登录按钮?

我正在尝试将谷歌默认登录按钮集成到我的网站中,尽管它工作正常,但我看到恼人的空白,如何消除它? 图像: 黑色的 Google 登录按钮

回答 2 投票 0

Tailwind CSS 彻底移除灯光模式

我在网上下载了一个Tailwind CSS模板,希望能够简化我正在做的一个项目的流程,但我遇到了一个小问题;我无法摆脱灯光模式。有一个设置开关...

回答 1 投票 0

为什么 NextJs app dir 全局 css 从页面迁移到应用程序后没有应用?

我目前正在从 NextJs 项目的页面目录迁移到应用程序目录。我已经创建了应用程序目录,为了使用国际化,我使用 next-intl 所以我的文件夹 strc...

回答 1 投票 0

Angular 中多个组件的相同样式

我有多个(大约 6 个)组件(HTML)具有相同的样式,例如 部分内容 部分字幕 这里可能会有不同

回答 2 投票 0

获取角度材质排版样式

如何在 Angular Material v16 中的自定义组件中获取排版级别样式? 我们以前可以将其写在 component.scss 中 @import '~@angular/material/theming'; $配置:...

回答 1 投票 0

Live Sass 编译器不编译“.min.css”或“.map”文件

问题是我的Live SASS编译器没有编译我设置在settings.json文件中创建的所有文件(放置在下一个目录:[my-project]/.vscode/settings.json)。这是 json 设置的副本...

回答 3 投票 0

封装css类不适用[nuxt3]

我使用 Nuxt3,正在编写一个简单的卡片组件。它有两个有两种颜色的版本,所以我想我会做与标题相同的事情:编写一个主要和次要类

回答 1 投票 0

SassError:顶级选择器可能不包含父选择器“&”$:: webkit-input-placeholder

我正在尝试运行一个使用 Sass 的旧 create-react-app 。当我运行 npm start 时,我首先收到以下错误“无法找到模块 sass”,其消息类型与此无法找到模块...

回答 1 投票 0

水平轮播中的文本样式问题。文字应该改变颜色

文本应根据其所在位置改变颜色。例如,左边的角应该是橙色,右边的角应该是紫色。你可以看到中间有边框的清晰过渡...

回答 2 投票 0

main.css 中的 Sass 变量和 css 样式

其实我想了解一些关于sass的具体知识,因为我对sass一无所知。问题是。我是否必须将 scss 文件与我正在工作或...的不同 css 文件链接

回答 1 投票 0

© www.soinside.com 2019 - 2024. All rights reserved.