离子 3 警报字体大小

Isa*_*lla 4 sass ionic2 ionic3

我正在使用 ion-select => ion-option 作为我的 ionic 3 项目的输入。它在选择时发出警报,但是警报正文的字体大小非常小,我尝试了所有 sass 选项来增加其字体大小,但徒劳无功。我试过使用.alert-md, .alert-tappable. 有什么办法可以增加这种字体。

在此处输入图片说明

.scss

.ios, .md {
  page-add-stock {
    /*.alert-md .alert-checkbox-label{

    }*/
    .alert-radio-label {
      font-size: 3rem;
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

.html

  <ion-select  [(ngModel)]="category" formControlName="category" >
    <ion-option>Pesticides</ion-option>
    <ion-option>Seeds</ion-option>
    <ion-option>Herbicides</ion-option>
    <ion-option>Fertilizers</ion-option>
    <ion-option>Farming tools</ion-option>
  </ion-select>
Run Code Online (Sandbox Code Playgroud)

生成警报的 Html 离子选择,以防万一。

seb*_*ras 5

我找不到任何与标签相关的 Ionic Sass 变量(我找到了一个用于消息、标题和警报副标题的变量,但没有用于标签),因此您始终可以使用 css 样式规则来设置正确的字体-尺寸:

.alert-radio-label {
    font-size: 3rem;
}
Run Code Online (Sandbox Code Playgroud)

默认适用font-size: 1.6rem;于 Android 和font-size: 1.4rem;iOS。

更新

请注意,alert html 元素在页面之外,因此应将样式规则放置在app.scss文件中。