This is a list of existing patterns applied to nesting UI elements to show dependency. Checkboxes are used as an example. Nesting also occurs with other UI elements like radio buttons, drop-downs etc.
To best experience the differences, enable the first sub option, then disable the primary option and re-enable it.
show that sub are also disabled with parent
(seen in macOS & Firefox)
hide sub elements if they can not be used
(seen in Firefox)
retain previous sub-state in disabled elements
(seen in Windows, macOS & Firefox)
hide sub elements if they can not be used
(seen in Windows)
hide sub elements and reset their value to default
(seen in Firefox)
show previous sub-state in disabled elements
(seen in HTML, Windows & macOS)
Related: