mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
fix(textarea): inherit white-space for better customization (#18508)
fixes #18495
This commit is contained in:
@ -16,6 +16,7 @@
|
|||||||
<ion-textarea value="value"></ion-textarea>
|
<ion-textarea value="value"></ion-textarea>
|
||||||
<ion-textarea value="44"></ion-textarea>
|
<ion-textarea value="44"></ion-textarea>
|
||||||
<ion-textarea placeholder="Custom" class="custom"></ion-textarea>
|
<ion-textarea placeholder="Custom" class="custom"></ion-textarea>
|
||||||
|
<ion-textarea id="nowrap" rows="15"></ion-textarea>
|
||||||
<ion-textarea placeholder="Auto Grow!" auto-grow="true"></ion-textarea>
|
<ion-textarea placeholder="Auto Grow!" auto-grow="true"></ion-textarea>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@ -23,6 +24,35 @@
|
|||||||
--background: papayawhip;
|
--background: papayawhip;
|
||||||
--color: blue;
|
--color: blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#nowrap {
|
||||||
|
font-size: 8px;
|
||||||
|
font-family: monospace;
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var textarea = document.querySelector('#nowrap');
|
||||||
|
|
||||||
|
textarea.value =
|
||||||
|
`@@@@@@@////////////////@@@(/#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
@@@@/////@@@@@@@@@@@@@@@///////@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
@@@////@@@@@@@@@@@@@@@@@///////@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
@(///@@@@@@@@@@@@@@@@@@@@/////@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
@///@@@@@@@(/////////&@@@@@@@@//@@@@@@@@@@///#@@@@//////////@@@@/////////////@@@////@@@@//////////@
|
||||||
|
///@@@@@@@/////////////@@@@@@@///@@@@@@@@@///#@@////@@@@@////(@@/////@@@@@////@@////@@(////@@@@,///
|
||||||
|
///@@@@@@///////////////@@@@@@///@@@@@@@@@///#@////@@@@@@@@///@@////@@@@@@@///@@////@@///@@@@@@@@@@
|
||||||
|
///@@@@@@///////////////@@@@@@///@@@@@@@@@///#@////@@@@@@@@///@@////@@@@@@@///@@////@#///@@@@@@@@@@
|
||||||
|
///@@@@@@///////////////@@@@@@///@@@@@@@@@///#@////@@@@@@@@///@@////@@@@@@@///@@////@@///@@@@@@@@@@
|
||||||
|
///@@@@@@@/////////////@@@@@@(///@@@@@@@@@///#@@/////@@@@////@@@////@@@@@@@///@@////@@@////@@@@////
|
||||||
|
@///@@@@@@@@/////////@@@@@@@@///@@@@@@@@@@///#@@@@//////////@@@@////@@@@@@@///@@////@@@@//////////@
|
||||||
|
@@///@@@@@@@@@@@@@@@@@@@@@@#///@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
@@@////@@@@@@@@@@@@@@@@@@@////@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
@@@@@/////@@@@@@@@@@@@@/////@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
@@@@@@@///////////////////@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@`;
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -42,6 +42,8 @@
|
|||||||
|
|
||||||
font-family: $font-family-base;
|
font-family: $font-family-base;
|
||||||
|
|
||||||
|
white-space: pre-wrap;
|
||||||
|
|
||||||
z-index: $z-index-item-input;
|
z-index: $z-index-item-input;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,8 +91,6 @@
|
|||||||
resize: none;
|
resize: none;
|
||||||
appearance: none;
|
appearance: none;
|
||||||
|
|
||||||
white-space: pre-wrap;
|
|
||||||
|
|
||||||
&::placeholder {
|
&::placeholder {
|
||||||
color: var(--placeholder-color);
|
color: var(--placeholder-color);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user