How to store inherit value inside a CSS custom property (aka CSS variables)?
up vote
2
down vote
favorite
Let's consider this simplified example1 in order to illustrate the issue:
:root
--color:rgba(20,20,20,0.5); /*defined as the default value*/
.box
width:50px;
height:50px;
display:inline-block;
margin-right:30px;
border-radius:50%;
position:relative;
.red background:rgba(255,0,0,0.5);
.blue background:rgba(0,255,0,0.5);
.box:before
content:"";
position:absolute;
top:0;left:0;right:0;bottom:0;
border-radius:50%;
transform:translateX(30px);
background:var(--color);
filter:invert(1);
<!-- we can add any color we want -->
<div class="box red" style="--color:rgba(0,255,0,0.5);">
</div>
<div class="box blue" style="--color:rgba(0,255,255,0.5);">
</div>
<!-- we can add the same color but this won't be dynamic -->
<div class="box red" style="--color:rgba(255,0,0,0.5);">
</div>
<!-- it would be good to be able to inherit the value but this won't work -->
<div class="box red" style="--color:inherit;">
</div>
In the above code we are able to manipulate the background
of the pseudo element using CSS variable. In some cases, we need to have the same color as the main element but since we don't know what color is used, we cannot set it manually and the best way should be to use the inherit
value.
As explained here: Css display property set to inherit with variable doesn't work, the use of inherit
won't work.
Is there any way to be able to store the inherit
value within a CSS variable and use it later within any property (background
in our example)?
css css3 css-variables
add a comment |
up vote
2
down vote
favorite
Let's consider this simplified example1 in order to illustrate the issue:
:root
--color:rgba(20,20,20,0.5); /*defined as the default value*/
.box
width:50px;
height:50px;
display:inline-block;
margin-right:30px;
border-radius:50%;
position:relative;
.red background:rgba(255,0,0,0.5);
.blue background:rgba(0,255,0,0.5);
.box:before
content:"";
position:absolute;
top:0;left:0;right:0;bottom:0;
border-radius:50%;
transform:translateX(30px);
background:var(--color);
filter:invert(1);
<!-- we can add any color we want -->
<div class="box red" style="--color:rgba(0,255,0,0.5);">
</div>
<div class="box blue" style="--color:rgba(0,255,255,0.5);">
</div>
<!-- we can add the same color but this won't be dynamic -->
<div class="box red" style="--color:rgba(255,0,0,0.5);">
</div>
<!-- it would be good to be able to inherit the value but this won't work -->
<div class="box red" style="--color:inherit;">
</div>
In the above code we are able to manipulate the background
of the pseudo element using CSS variable. In some cases, we need to have the same color as the main element but since we don't know what color is used, we cannot set it manually and the best way should be to use the inherit
value.
As explained here: Css display property set to inherit with variable doesn't work, the use of inherit
won't work.
Is there any way to be able to store the inherit
value within a CSS variable and use it later within any property (background
in our example)?
css css3 css-variables
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
Let's consider this simplified example1 in order to illustrate the issue:
:root
--color:rgba(20,20,20,0.5); /*defined as the default value*/
.box
width:50px;
height:50px;
display:inline-block;
margin-right:30px;
border-radius:50%;
position:relative;
.red background:rgba(255,0,0,0.5);
.blue background:rgba(0,255,0,0.5);
.box:before
content:"";
position:absolute;
top:0;left:0;right:0;bottom:0;
border-radius:50%;
transform:translateX(30px);
background:var(--color);
filter:invert(1);
<!-- we can add any color we want -->
<div class="box red" style="--color:rgba(0,255,0,0.5);">
</div>
<div class="box blue" style="--color:rgba(0,255,255,0.5);">
</div>
<!-- we can add the same color but this won't be dynamic -->
<div class="box red" style="--color:rgba(255,0,0,0.5);">
</div>
<!-- it would be good to be able to inherit the value but this won't work -->
<div class="box red" style="--color:inherit;">
</div>
In the above code we are able to manipulate the background
of the pseudo element using CSS variable. In some cases, we need to have the same color as the main element but since we don't know what color is used, we cannot set it manually and the best way should be to use the inherit
value.
As explained here: Css display property set to inherit with variable doesn't work, the use of inherit
won't work.
Is there any way to be able to store the inherit
value within a CSS variable and use it later within any property (background
in our example)?
css css3 css-variables
Let's consider this simplified example1 in order to illustrate the issue:
:root
--color:rgba(20,20,20,0.5); /*defined as the default value*/
.box
width:50px;
height:50px;
display:inline-block;
margin-right:30px;
border-radius:50%;
position:relative;
.red background:rgba(255,0,0,0.5);
.blue background:rgba(0,255,0,0.5);
.box:before
content:"";
position:absolute;
top:0;left:0;right:0;bottom:0;
border-radius:50%;
transform:translateX(30px);
background:var(--color);
filter:invert(1);
<!-- we can add any color we want -->
<div class="box red" style="--color:rgba(0,255,0,0.5);">
</div>
<div class="box blue" style="--color:rgba(0,255,255,0.5);">
</div>
<!-- we can add the same color but this won't be dynamic -->
<div class="box red" style="--color:rgba(255,0,0,0.5);">
</div>
<!-- it would be good to be able to inherit the value but this won't work -->
<div class="box red" style="--color:inherit;">
</div>
In the above code we are able to manipulate the background
of the pseudo element using CSS variable. In some cases, we need to have the same color as the main element but since we don't know what color is used, we cannot set it manually and the best way should be to use the inherit
value.
As explained here: Css display property set to inherit with variable doesn't work, the use of inherit
won't work.
Is there any way to be able to store the inherit
value within a CSS variable and use it later within any property (background
in our example)?
:root
--color:rgba(20,20,20,0.5); /*defined as the default value*/
.box
width:50px;
height:50px;
display:inline-block;
margin-right:30px;
border-radius:50%;
position:relative;
.red background:rgba(255,0,0,0.5);
.blue background:rgba(0,255,0,0.5);
.box:before
content:"";
position:absolute;
top:0;left:0;right:0;bottom:0;
border-radius:50%;
transform:translateX(30px);
background:var(--color);
filter:invert(1);
<!-- we can add any color we want -->
<div class="box red" style="--color:rgba(0,255,0,0.5);">
</div>
<div class="box blue" style="--color:rgba(0,255,255,0.5);">
</div>
<!-- we can add the same color but this won't be dynamic -->
<div class="box red" style="--color:rgba(255,0,0,0.5);">
</div>
<!-- it would be good to be able to inherit the value but this won't work -->
<div class="box red" style="--color:inherit;">
</div>
:root
--color:rgba(20,20,20,0.5); /*defined as the default value*/
.box
width:50px;
height:50px;
display:inline-block;
margin-right:30px;
border-radius:50%;
position:relative;
.red background:rgba(255,0,0,0.5);
.blue background:rgba(0,255,0,0.5);
.box:before
content:"";
position:absolute;
top:0;left:0;right:0;bottom:0;
border-radius:50%;
transform:translateX(30px);
background:var(--color);
filter:invert(1);
<!-- we can add any color we want -->
<div class="box red" style="--color:rgba(0,255,0,0.5);">
</div>
<div class="box blue" style="--color:rgba(0,255,255,0.5);">
</div>
<!-- we can add the same color but this won't be dynamic -->
<div class="box red" style="--color:rgba(255,0,0,0.5);">
</div>
<!-- it would be good to be able to inherit the value but this won't work -->
<div class="box red" style="--color:inherit;">
</div>
css css3 css-variables
css css3 css-variables
edited Nov 25 at 10:15
asked Nov 10 at 14:22
Temani Afif
62.2k93573
62.2k93573
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
In such case, we can consider the fallback value of a CSS variable. Like explained in the specification we can write something like this:
background:var(--color,inherit)
By doing this, we tell our property (background
) to use inherit
in case --color
is not defined.
This may solve the issue but in our case it won't be enough since --color
is always defined at :root
level and will get inherited1 by the pseudo element thus we will never use the fallback value.
To fix this we can consider the initial
value in order to undefine our custom property and force the use of the fallback value. As described in the specification:
The initial value of a custom property is an empty value; that is, nothing at all. This initial value has a special interaction with the var() notation, which is explained in the section defining var().
and
To substitute a var() in a property’s value:
- If the custom property named by the first argument to the var()
function is animation-tainted, and the var() function is being used in
the animation property or one of its longhands, treat the custom
property as having its initial value for the rest of this algorithm.
- If the value of the custom property named by the first argument to the
var() function is anything but the initial value, replace the var()
function by the value of the corresponding custom property. Otherwise,
- if the var() function has a fallback value as its second argument,
replace the var() function by the fallback value. If there are any
var() references in the fallback, substitute them as well.
- Otherwise, the property containing the var() function is invalid at
computed-value time
Our code will then look like this:
:root
--color:rgba(20,20,20,0.5); /*defined as the default value*/
.box
width:50px;
height:50px;
display:inline-block;
margin-right:30px;
border-radius:50%;
position:relative;
.red background:rgba(255,0,0,0.5);
.blue background:rgba(0,255,0,0.5);
.box:before
content:"";
position:absolute;
top:0;left:0;right:0;bottom:0;
border-radius:50%;
transform:translateX(30px);
background:var(--color,inherit);
filter:invert(1);
<div class="box red" style="--color:initial;">
</div>
<div class="box blue" style="--color:initial;">
</div>
<div class="box" style="background:grey;--color:initial;">
</div>
We simply need to set initial
to the custom property in order to force the inherit
to be used as a value within background
.
The usage of initial
can also be useful in order to stop the propagation of CSS variable at a particular level since by default it's inherited by all the elements.
Here is an example:
:root
--color: blue;
.container div
border:5px solid var(--color,red);
padding:5px;
.stop
--color:initial;
.green
--color:green;
<div class="container">
<div>
<div>
<div class="stop"> <!-- we stop at this level -->
<div>
</div>
</div>
</div>
</div>
</div>
<div class="container stop"> <!-- we stop at this level -->
<div>
<div>
<div class="green"> <!-- we redefine at this level -->
<div>
</div>
</div>
</div>
</div>
</div>
1: it's about the inheritance of the custom property and not the background property
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
In such case, we can consider the fallback value of a CSS variable. Like explained in the specification we can write something like this:
background:var(--color,inherit)
By doing this, we tell our property (background
) to use inherit
in case --color
is not defined.
This may solve the issue but in our case it won't be enough since --color
is always defined at :root
level and will get inherited1 by the pseudo element thus we will never use the fallback value.
To fix this we can consider the initial
value in order to undefine our custom property and force the use of the fallback value. As described in the specification:
The initial value of a custom property is an empty value; that is, nothing at all. This initial value has a special interaction with the var() notation, which is explained in the section defining var().
and
To substitute a var() in a property’s value:
- If the custom property named by the first argument to the var()
function is animation-tainted, and the var() function is being used in
the animation property or one of its longhands, treat the custom
property as having its initial value for the rest of this algorithm.
- If the value of the custom property named by the first argument to the
var() function is anything but the initial value, replace the var()
function by the value of the corresponding custom property. Otherwise,
- if the var() function has a fallback value as its second argument,
replace the var() function by the fallback value. If there are any
var() references in the fallback, substitute them as well.
- Otherwise, the property containing the var() function is invalid at
computed-value time
Our code will then look like this:
:root
--color:rgba(20,20,20,0.5); /*defined as the default value*/
.box
width:50px;
height:50px;
display:inline-block;
margin-right:30px;
border-radius:50%;
position:relative;
.red background:rgba(255,0,0,0.5);
.blue background:rgba(0,255,0,0.5);
.box:before
content:"";
position:absolute;
top:0;left:0;right:0;bottom:0;
border-radius:50%;
transform:translateX(30px);
background:var(--color,inherit);
filter:invert(1);
<div class="box red" style="--color:initial;">
</div>
<div class="box blue" style="--color:initial;">
</div>
<div class="box" style="background:grey;--color:initial;">
</div>
We simply need to set initial
to the custom property in order to force the inherit
to be used as a value within background
.
The usage of initial
can also be useful in order to stop the propagation of CSS variable at a particular level since by default it's inherited by all the elements.
Here is an example:
:root
--color: blue;
.container div
border:5px solid var(--color,red);
padding:5px;
.stop
--color:initial;
.green
--color:green;
<div class="container">
<div>
<div>
<div class="stop"> <!-- we stop at this level -->
<div>
</div>
</div>
</div>
</div>
</div>
<div class="container stop"> <!-- we stop at this level -->
<div>
<div>
<div class="green"> <!-- we redefine at this level -->
<div>
</div>
</div>
</div>
</div>
</div>
1: it's about the inheritance of the custom property and not the background property
add a comment |
up vote
2
down vote
accepted
In such case, we can consider the fallback value of a CSS variable. Like explained in the specification we can write something like this:
background:var(--color,inherit)
By doing this, we tell our property (background
) to use inherit
in case --color
is not defined.
This may solve the issue but in our case it won't be enough since --color
is always defined at :root
level and will get inherited1 by the pseudo element thus we will never use the fallback value.
To fix this we can consider the initial
value in order to undefine our custom property and force the use of the fallback value. As described in the specification:
The initial value of a custom property is an empty value; that is, nothing at all. This initial value has a special interaction with the var() notation, which is explained in the section defining var().
and
To substitute a var() in a property’s value:
- If the custom property named by the first argument to the var()
function is animation-tainted, and the var() function is being used in
the animation property or one of its longhands, treat the custom
property as having its initial value for the rest of this algorithm.
- If the value of the custom property named by the first argument to the
var() function is anything but the initial value, replace the var()
function by the value of the corresponding custom property. Otherwise,
- if the var() function has a fallback value as its second argument,
replace the var() function by the fallback value. If there are any
var() references in the fallback, substitute them as well.
- Otherwise, the property containing the var() function is invalid at
computed-value time
Our code will then look like this:
:root
--color:rgba(20,20,20,0.5); /*defined as the default value*/
.box
width:50px;
height:50px;
display:inline-block;
margin-right:30px;
border-radius:50%;
position:relative;
.red background:rgba(255,0,0,0.5);
.blue background:rgba(0,255,0,0.5);
.box:before
content:"";
position:absolute;
top:0;left:0;right:0;bottom:0;
border-radius:50%;
transform:translateX(30px);
background:var(--color,inherit);
filter:invert(1);
<div class="box red" style="--color:initial;">
</div>
<div class="box blue" style="--color:initial;">
</div>
<div class="box" style="background:grey;--color:initial;">
</div>
We simply need to set initial
to the custom property in order to force the inherit
to be used as a value within background
.
The usage of initial
can also be useful in order to stop the propagation of CSS variable at a particular level since by default it's inherited by all the elements.
Here is an example:
:root
--color: blue;
.container div
border:5px solid var(--color,red);
padding:5px;
.stop
--color:initial;
.green
--color:green;
<div class="container">
<div>
<div>
<div class="stop"> <!-- we stop at this level -->
<div>
</div>
</div>
</div>
</div>
</div>
<div class="container stop"> <!-- we stop at this level -->
<div>
<div>
<div class="green"> <!-- we redefine at this level -->
<div>
</div>
</div>
</div>
</div>
</div>
1: it's about the inheritance of the custom property and not the background property
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
In such case, we can consider the fallback value of a CSS variable. Like explained in the specification we can write something like this:
background:var(--color,inherit)
By doing this, we tell our property (background
) to use inherit
in case --color
is not defined.
This may solve the issue but in our case it won't be enough since --color
is always defined at :root
level and will get inherited1 by the pseudo element thus we will never use the fallback value.
To fix this we can consider the initial
value in order to undefine our custom property and force the use of the fallback value. As described in the specification:
The initial value of a custom property is an empty value; that is, nothing at all. This initial value has a special interaction with the var() notation, which is explained in the section defining var().
and
To substitute a var() in a property’s value:
- If the custom property named by the first argument to the var()
function is animation-tainted, and the var() function is being used in
the animation property or one of its longhands, treat the custom
property as having its initial value for the rest of this algorithm.
- If the value of the custom property named by the first argument to the
var() function is anything but the initial value, replace the var()
function by the value of the corresponding custom property. Otherwise,
- if the var() function has a fallback value as its second argument,
replace the var() function by the fallback value. If there are any
var() references in the fallback, substitute them as well.
- Otherwise, the property containing the var() function is invalid at
computed-value time
Our code will then look like this:
:root
--color:rgba(20,20,20,0.5); /*defined as the default value*/
.box
width:50px;
height:50px;
display:inline-block;
margin-right:30px;
border-radius:50%;
position:relative;
.red background:rgba(255,0,0,0.5);
.blue background:rgba(0,255,0,0.5);
.box:before
content:"";
position:absolute;
top:0;left:0;right:0;bottom:0;
border-radius:50%;
transform:translateX(30px);
background:var(--color,inherit);
filter:invert(1);
<div class="box red" style="--color:initial;">
</div>
<div class="box blue" style="--color:initial;">
</div>
<div class="box" style="background:grey;--color:initial;">
</div>
We simply need to set initial
to the custom property in order to force the inherit
to be used as a value within background
.
The usage of initial
can also be useful in order to stop the propagation of CSS variable at a particular level since by default it's inherited by all the elements.
Here is an example:
:root
--color: blue;
.container div
border:5px solid var(--color,red);
padding:5px;
.stop
--color:initial;
.green
--color:green;
<div class="container">
<div>
<div>
<div class="stop"> <!-- we stop at this level -->
<div>
</div>
</div>
</div>
</div>
</div>
<div class="container stop"> <!-- we stop at this level -->
<div>
<div>
<div class="green"> <!-- we redefine at this level -->
<div>
</div>
</div>
</div>
</div>
</div>
1: it's about the inheritance of the custom property and not the background property
In such case, we can consider the fallback value of a CSS variable. Like explained in the specification we can write something like this:
background:var(--color,inherit)
By doing this, we tell our property (background
) to use inherit
in case --color
is not defined.
This may solve the issue but in our case it won't be enough since --color
is always defined at :root
level and will get inherited1 by the pseudo element thus we will never use the fallback value.
To fix this we can consider the initial
value in order to undefine our custom property and force the use of the fallback value. As described in the specification:
The initial value of a custom property is an empty value; that is, nothing at all. This initial value has a special interaction with the var() notation, which is explained in the section defining var().
and
To substitute a var() in a property’s value:
- If the custom property named by the first argument to the var()
function is animation-tainted, and the var() function is being used in
the animation property or one of its longhands, treat the custom
property as having its initial value for the rest of this algorithm.
- If the value of the custom property named by the first argument to the
var() function is anything but the initial value, replace the var()
function by the value of the corresponding custom property. Otherwise,
- if the var() function has a fallback value as its second argument,
replace the var() function by the fallback value. If there are any
var() references in the fallback, substitute them as well.
- Otherwise, the property containing the var() function is invalid at
computed-value time
Our code will then look like this:
:root
--color:rgba(20,20,20,0.5); /*defined as the default value*/
.box
width:50px;
height:50px;
display:inline-block;
margin-right:30px;
border-radius:50%;
position:relative;
.red background:rgba(255,0,0,0.5);
.blue background:rgba(0,255,0,0.5);
.box:before
content:"";
position:absolute;
top:0;left:0;right:0;bottom:0;
border-radius:50%;
transform:translateX(30px);
background:var(--color,inherit);
filter:invert(1);
<div class="box red" style="--color:initial;">
</div>
<div class="box blue" style="--color:initial;">
</div>
<div class="box" style="background:grey;--color:initial;">
</div>
We simply need to set initial
to the custom property in order to force the inherit
to be used as a value within background
.
The usage of initial
can also be useful in order to stop the propagation of CSS variable at a particular level since by default it's inherited by all the elements.
Here is an example:
:root
--color: blue;
.container div
border:5px solid var(--color,red);
padding:5px;
.stop
--color:initial;
.green
--color:green;
<div class="container">
<div>
<div>
<div class="stop"> <!-- we stop at this level -->
<div>
</div>
</div>
</div>
</div>
</div>
<div class="container stop"> <!-- we stop at this level -->
<div>
<div>
<div class="green"> <!-- we redefine at this level -->
<div>
</div>
</div>
</div>
</div>
</div>
1: it's about the inheritance of the custom property and not the background property
:root
--color:rgba(20,20,20,0.5); /*defined as the default value*/
.box
width:50px;
height:50px;
display:inline-block;
margin-right:30px;
border-radius:50%;
position:relative;
.red background:rgba(255,0,0,0.5);
.blue background:rgba(0,255,0,0.5);
.box:before
content:"";
position:absolute;
top:0;left:0;right:0;bottom:0;
border-radius:50%;
transform:translateX(30px);
background:var(--color,inherit);
filter:invert(1);
<div class="box red" style="--color:initial;">
</div>
<div class="box blue" style="--color:initial;">
</div>
<div class="box" style="background:grey;--color:initial;">
</div>
:root
--color:rgba(20,20,20,0.5); /*defined as the default value*/
.box
width:50px;
height:50px;
display:inline-block;
margin-right:30px;
border-radius:50%;
position:relative;
.red background:rgba(255,0,0,0.5);
.blue background:rgba(0,255,0,0.5);
.box:before
content:"";
position:absolute;
top:0;left:0;right:0;bottom:0;
border-radius:50%;
transform:translateX(30px);
background:var(--color,inherit);
filter:invert(1);
<div class="box red" style="--color:initial;">
</div>
<div class="box blue" style="--color:initial;">
</div>
<div class="box" style="background:grey;--color:initial;">
</div>
:root
--color: blue;
.container div
border:5px solid var(--color,red);
padding:5px;
.stop
--color:initial;
.green
--color:green;
<div class="container">
<div>
<div>
<div class="stop"> <!-- we stop at this level -->
<div>
</div>
</div>
</div>
</div>
</div>
<div class="container stop"> <!-- we stop at this level -->
<div>
<div>
<div class="green"> <!-- we redefine at this level -->
<div>
</div>
</div>
</div>
</div>
</div>
:root
--color: blue;
.container div
border:5px solid var(--color,red);
padding:5px;
.stop
--color:initial;
.green
--color:green;
<div class="container">
<div>
<div>
<div class="stop"> <!-- we stop at this level -->
<div>
</div>
</div>
</div>
</div>
</div>
<div class="container stop"> <!-- we stop at this level -->
<div>
<div>
<div class="green"> <!-- we redefine at this level -->
<div>
</div>
</div>
</div>
</div>
</div>
edited Nov 11 at 9:45
answered Nov 10 at 14:22
Temani Afif
62.2k93573
62.2k93573
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53239880%2fhow-to-store-inherit-value-inside-a-css-custom-property-aka-css-variables%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown