Skip to content

Commit c8f817c

Browse files
committed
refactor(contenet): update padding variables
1 parent 412806f commit c8f817c

3 files changed

Lines changed: 22 additions & 4 deletions

File tree

core/src/components/content/test/basic/index.html

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</ion-header>
2727

2828
<div style="display: flex; flex: 1">
29-
<ion-content class="ion-padding" style="text-align: center; flex: 2" id="content">
29+
<ion-content id="content">
3030
<ion-content id="content-part">
3131
<f style="height: 50%"></f>
3232
<p>
@@ -135,6 +135,20 @@
135135
f:last-of-type {
136136
background: yellow;
137137
}
138+
139+
#content {
140+
--ion-content-padding-start: 16px;
141+
--ion-content-padding-end: 16px;
142+
--ion-content-padding-top: 16px;
143+
--ion-content-padding-bottom: 16px;
144+
145+
text-align: center;
146+
flex: 2;
147+
}
148+
149+
ion-content#content-part::part(background) {
150+
background: #eee;
151+
}
138152
</style>
139153
</ion-app>
140154
</body>

core/src/components/content/test/fullscreen/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@
6767
ion-content {
6868
--ion-content-background: linear-gradient(90deg, blue, red);
6969
--ion-content-color: white;
70+
--ion-content-padding-start: 16px;
71+
--ion-content-padding-end: 16px;
72+
--ion-content-padding-top: 16px;
73+
--ion-content-padding-bottom: 16px;
7074
}
7175

7276
p:first-child {

core/src/components/content/test/standalone/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</head>
1616
<body>
1717
<div class="content-height">
18-
<ion-content class="ion-padding">
18+
<ion-content>
1919
<h1>Heading</h1>
2020
<h2>Heading</h2>
2121
<h3>Heading</h3>
@@ -28,7 +28,7 @@ <h6>Heading</h6>
2828
</div>
2929

3030
<div class="content-height">
31-
<ion-content class="ion-padding" color="secondary">
31+
<ion-content color="secondary">
3232
<h1>Heading</h1>
3333
<h2>Heading</h2>
3434
<h3>Heading</h3>
@@ -41,7 +41,7 @@ <h6>Heading</h6>
4141
</div>
4242

4343
<div class="content-height">
44-
<ion-content class="ion-padding custom-color">
44+
<ion-content class="custom-color">
4545
<h1>Heading</h1>
4646
<h2>Heading</h2>
4747
<h3>Heading</h3>

0 commit comments

Comments
 (0)