@@ -123,6 +123,56 @@ main {
123123 max-width : 65ch ;
124124}
125125
126+ /* full bleed for highlighted example code. This works for
127+ highlighted code directly in each section. If the example
128+ is inside a list, table etc, the list/table is constrained
129+ to 65ch and we don't get a full bleed example.
130+
131+ div.section *:not(div[class^=highlight-]):not(div[class^=highlight-] *):not(div.section) {
132+ max-width: 65ch;
133+ }
134+ */
135+
136+ /* trying to full bleed highlighted code section using using
137+ grid layout. Doesn't work as each header level inserts a
138+ div.section, so the grid is applied to main > div > div >
139+ div.section and highlighted code isn't in a grid display
140+ environment anymore. Subgrid would fix this but....
141+
142+ main > div > div {
143+ display: grid;
144+ grid-template-columns: 65ch 1fr;
145+ }
146+
147+ main > div > div > * {
148+ grid-column: 1/2;
149+ }
150+
151+ div[class^=highlight] {
152+ width: 100%;
153+ grid-column: 1 / 3;
154+ }
155+ */
156+
157+ /* try full bleed without grid. Make everything except the
158+ highlight container and its children 65ch in width.
159+ However need to explicitly set a width for some reason on
160+ the container and children. 100% or other relative width
161+ doesn't work. Probably again because of div.section being
162+ set to 65ch max width. Can use absolute size values, but
163+ how to calculate them when I don't know where the left
164+ margin is of the highlight div.
165+
166+ main :not(div[class^=highlight-]):not(div[class^=highlight-] *) {
167+ position: relative;
168+ max-width: 65ch;
169+ }
170+
171+ div[class^=highlight-], div[class^=highlight-] * { width:
172+ calc(100vw
173+ - 15em); }
174+ */
175+
126176/* style */
127177
128178: link { color : rgb (220 , 0 , 0 ); text-decoration : none;}
0 commit comments