diff --git a/tests/code_cols.rs b/tests/code_cols.rsindex 73a3ccb..c73a045 100644--- a/tests/code_cols.rs+++ b/tests/code_cols.rs@@ -1,6 +1,6 @@1-//! Code tab two columns (m6, f0rge issue #45):2-//! files + README share the existing `.cols` grid, side by side only at3-//! >=1100px (files 7/12, README 5/12), stacked below.1+//! Code tab stack (f0rge issue #120):2+//! files and README share one stacked `.cols` column at every width, in3+//! DOM order Files then README. No desktop sidebar split.44 //!55 //! Builds a small fixture repo with the real binary and string-asserts on66 //! the emitted HTML + `static/style.css` (no rendering engine needed).@@ -76,15 +76,19 @@ fn css() -> String {7676 }7777 7878 #[test]79-fn code_tab_wraps_files_and_readme_in_cols_code() {79+fn code_tab_wraps_files_and_readme_in_stacked_column() {8080 let out = build_fixture();8181 let index = std::fs::read_to_string(out.join("index.html")).expect("index");82- // Wrapper reuses the existing .cols pattern with the code variant.82+ // Wrapper is one plain stacked grid; no code-specific column variant.8383 assert!(84- index.contains("<div class=\"cols cols-code\">"),85- "code tab wraps files + README in .cols.cols-code"84+ index.contains("<div class=\"cols\">"),85+ "code tab wraps files + README in .cols"8686 );87- // Two sections in order: files (table) left, README right.87+ assert!(88+ !index.contains("cols-code"),89+ "no dead side-by-side class in the markup"90+ );91+ // Two sections in order: files first, then README.8892 let files_pos = index8993 .find("<section class=\"code-files\">")9094 .expect("files section");@@ -102,7 +106,7 @@ fn code_tab_wraps_files_and_readme_in_cols_code() {102106 );103107 assert!(104108 files_block.contains("file-table"),105- "file table lives in the files (left) column"109+ "file table lives in the files section"106110 );107111 let readme_block = &index[readme_pos..];108112 assert!(@@ -111,12 +115,12 @@ fn code_tab_wraps_files_and_readme_in_cols_code() {111115 );112116 assert!(113117 readme_block.contains("cols fixture"),114- "README body renders in the right column"118+ "README body renders after the file table"115119 );116120 }117121 118122 #[test]119-fn code_cols_breakpoint_is_1100px_stacked_below() {123+fn code_tab_is_always_stacked() {120124 let css = css();121125 // Mobile-first base: .cols is a single stacked column.122126 let base = css.split("@media (min-width").next().expect("base css");@@ -124,42 +128,18 @@ fn code_cols_breakpoint_is_1100px_stacked_below() {124128 base.contains(".cols{display:grid;grid-template-columns:minmax(0,1fr)"),125129 "base .cols stays stacked single-column"126130 );127- // The code variant stays stacked through the 768px breakpoint128- // (overrides the generic .cols side-by-side there).131+ // No code-specific columns and no wide-screen split anywhere.132+ assert!(!css.contains(".cols-code"), "no code column variant");129133 assert!(130- css.contains("@media (min-width:768px)"),131- "768px breakpoint kept"134+ !css.contains("minmax(0,1.25fr)"),135+ "generic .cols no longer goes two-column"132136 );133137 assert!(134- css.contains("@media (min-width:1100px)"),135- "1100px breakpoint present"138+ !css.contains("minmax(0,7fr)") && !css.contains("minmax(0,5fr)"),139+ "no desktop 7/5 files+README split"136140 );137- let stacked_rule = ".cols-code{grid-template-columns:minmax(0,1fr)}";138141 assert!(139- css.contains(stacked_rule),140- "cols-code stays stacked below 1100px, got no {stacked_rule:?}"141- );142- // Desktop: files 7/12 + README 5/12 inside the 1100px block.143- let wide_rule = ".cols-code{grid-template-columns:minmax(0,7fr) minmax(0,5fr)}";144- assert!(145- css.contains(wide_rule),146- "cols-code is 7/12 + 5/12 at >=1100px, got no {wide_rule:?}"147- );148- let block_1100 = css149- .split("@media (min-width:1100px)")150- .nth(1)151- .expect("1100px block");152- let first_chunk = block_1100.split("@media").next().expect("1100 chunk");153- assert!(154- first_chunk.contains(".cols-code"),155- "7/5 rule lives in the 1100px block"156- );157- // Cascade order: the stacked 768px override comes before the 1100px158- // two-column rule, so desktop wins and 768px–1099px stays stacked.159- let stacked_pos = css.find(stacked_rule).expect("stacked rule pos");160- let wide_pos = css.find(wide_rule).expect("wide rule pos");161- assert!(162- stacked_pos < wide_pos,163- "stacked override precedes the 1100px two-column rule"142+ css.contains("@media (min-width:1100px)") && css.contains(".wrap{max-width:72rem"),143+ "wide layout keeps the readable content width"164144 );165145 }