目录

基金会 - 全球风格( Global Styles)

在本章中,我们将研究Global Styles 。 Foundation框架的全局CSS包括有用的重置,可确保样式在浏览器中保持一致。

字体大小调整

默认情况下,浏览器样式表的字体大小设置为100%。 默认字体大小设置为16像素。 根据字体大小,计算网格大小。 要使用不同的基本字体大小和未受影响的网格断点,请将$rem-base设置$rem-base $global-font-size值,该值必须以像素为单位。

Colors

linksbuttons等交互式元素使用来自SASS变量$primary-color默认蓝色阴影。 组件还可以具有以下颜色: secondary, alert, success and warning 。 有关更多信息,请here

SASS参考 (SASS Reference)

变量 (Variables)

下表列出了SASS变量,这些变量用于自定义项目_settings.scss中组件的默认样式。

Sr.No. 名称和描述 类型 默认值
1

$global-width

它代表网站的全局宽度。 用于确定网格的行宽。

Numberrem-calc(1200)
2

$global-font-size

它表示应用于《html》《body》的字体大小。 默认设置为100%,用户的浏览器设置值将被继承。

Number100%
3

$global-lineheight

它代表所有类型的默认行高。 $global-lineheight是24px而$global-font-size设置为16px。

Number1.5
4

$primary-color

它为交互式组件(如链接和按钮)提供颜色。

Color#2199e8
5

$secondary-color

它与组件一起使用,它支持.secondary类。

Color#777
6

$success-color

它表示与.success类一起使用时的正状态或操作。

Color#3adb76
7

$warning-color

当与.warning类一起使用时,它表示警告状态或操作。

Color#ffae00
8

$alert-color

.alert类一起使用时,它表示负面状态或操作。

Color#ec5840
9

$light-gray

它用于浅灰色UI项目。

Color#e6e6e6
10

$medium-gray

它用于中灰色UI项目。

Color#cacaca
11

$dark-gray

它用于深灰色UI项目。

Color#8a8a8a
12

$black

它用于黑色UI项目。

Color#0a0a0a
13

$white

它用于白色UI项目。

Color#fefefe
14

$body-background

它代表身体的背景颜色。

Color$white
15

$body-font-color

它代表身体的文字颜色。

Color$black
16

$body-font-family

它代表正文的字体列表。

List 'Helvetica Neue',Helvetica,Roboto,Arial,sans-serif
17

$body-antialiased

通过使用CSS属性-webkit-font-smoothing-moz-osx-font-smoothing将此属性设置为true来启用抗锯齿类型。

Booleantrue
18

$global-margin

它代表组件的全球保证金价值。

Number1rem
19

$global-padding

它表示组件的全局填充值。

Number1rem
20

$global-margin

它表示组件之间使用的全局边际值。

Number1rem
21

$global-weight-normal

它表示普通类型的全局字体粗细。

Keyword or Numbernormal
22

$global-weight-bold

它表示粗体类型的全局字体粗细。

Keyword or Numberbold
23

$global-radius

它表示具有边界半径的所有元素的全局值。

Number0
24

$global-text-direction

它将CSS的文本方向设置为ltrrtl

ltr
↑回到顶部↑
WIKI教程 @2018