@@ -744,7 +744,6 @@ describe("components.css theme-sensitive surfaces", () => {
744744 const mobilePageHeaderBack = getLastRuleBlock ( ".mobile-page-header .page-header__back" ) ;
745745 const headerLeading = getLastRuleBlock ( ".page-header__leading" ) ;
746746 const backButton = getLastRuleBlock ( ".mobile-sheet--fullscreen .page-header__back" ) ;
747- const fullscreenTitle = getLastRuleBlock ( ".mobile-sheet--fullscreen .page-header__title" ) ;
748747 const headerActions = getLastRuleBlock ( ".page-header__actions" ) ;
749748
750749 expect ( fullscreenHeader ) . toContain ( "padding: 0 var(--sp-3)" ) ;
@@ -759,9 +758,7 @@ describe("components.css theme-sensitive surfaces", () => {
759758 expect ( headerLeading ) . toContain ( "flex: 1" ) ;
760759 expect ( backButton ) . toContain ( "background: transparent" ) ;
761760 expect ( backButton ) . not . toContain ( "border-radius: 999px" ) ;
762- expect ( fullscreenTitle ) . toContain ( "font-size: var(--type-app-title-size)" ) ;
763- expect ( fullscreenTitle ) . toContain ( "line-height: var(--type-app-title-line-height)" ) ;
764- expect ( fullscreenTitle ) . toContain ( "font-weight: var(--type-app-title-weight)" ) ;
761+ expect ( hasRuleBlock ( ".mobile-sheet--fullscreen .page-header__title" ) ) . toBe ( false ) ;
765762 expect ( headerActions ) . toContain ( "margin-left: auto" ) ;
766763 } ) ;
767764
@@ -824,6 +821,10 @@ describe("components.css theme-sensitive surfaces", () => {
824821 getRuleBlocksFrom ( modalStylesheet , ".dialogHeader" ) . find ( ( block ) =>
825822 block . includes ( "align-items: flex-start" )
826823 ) ?? "" ;
824+ const dialogDescription = getLastRuleBlockFrom (
825+ modalStylesheet ,
826+ ":global(.dialog-header__description)"
827+ ) ;
827828 const dialogIcon = getLastRuleBlock ( ".supervisor-dialog-header-icon" ) ;
828829 const editTone = getLastRuleBlock ( ".supervisor-dialog--edit .supervisor-dialog-header-icon" ) ;
829830 const disableTone = getLastRuleBlock (
@@ -833,6 +834,9 @@ describe("components.css theme-sensitive surfaces", () => {
833834 expect ( modalTitle ) . toContain ( "font-size: var(--type-section-title-size)" ) ;
834835 expect ( modalTitle ) . toContain ( "line-height: var(--type-section-title-line-height)" ) ;
835836 expect ( modalTitle ) . toContain ( "font-weight: var(--type-section-title-weight)" ) ;
837+ expect ( dialogDescription ) . toContain ( "font-size: var(--type-meta-size)" ) ;
838+ expect ( dialogDescription ) . toContain ( "line-height: var(--type-meta-line-height)" ) ;
839+ expect ( dialogDescription ) . toContain ( "font-weight: var(--type-meta-weight)" ) ;
836840 expect ( dialogHeader ) . toContain ( "align-items: flex-start" ) ;
837841 expect ( dialogIcon ) . toContain ( "width: 28px" ) ;
838842 expect ( dialogIcon ) . toContain ( "height: 28px" ) ;
@@ -842,6 +846,30 @@ describe("components.css theme-sensitive surfaces", () => {
842846 expect ( disableTone ) . toContain ( "var(--icon-error)" ) ;
843847 expect ( hasRuleBlock ( ".supervisor-dialog-header" ) ) . toBe ( false ) ;
844848 expect ( hasRuleBlock ( ".supervisor-dialog-subtitle" ) ) . toBe ( false ) ;
849+ expect ( hasRuleBlock ( ".supervisor-dialog .modal-header h3" ) ) . toBe ( false ) ;
850+ } ) ;
851+
852+ it ( "does not allow page or modal wrappers to override approved header typography tokens" , ( ) => {
853+ const settingsBack = getLastRuleBlock (
854+ ".settings-header .mobile-page-header .page-header__back"
855+ ) ;
856+ const mobileSettingsBack = getLastRuleBlock (
857+ ".settings-page--mobile > .settings-header .mobile-page-header .page-header__back"
858+ ) ;
859+
860+ expect ( hasRuleBlock ( ".mobile-sheet--fullscreen .page-header__title" ) ) . toBe ( false ) ;
861+ expect ( hasRuleBlock ( ".settings-header .mobile-page-header .page-header__title" ) ) . toBe ( false ) ;
862+ expect (
863+ hasRuleBlock (
864+ ".settings-page--mobile > .settings-header .mobile-page-header .page-header__title"
865+ )
866+ ) . toBe ( false ) ;
867+ expect ( settingsBack ) . not . toContain ( "font-size:" ) ;
868+ expect ( settingsBack ) . not . toContain ( "line-height:" ) ;
869+ expect ( settingsBack ) . not . toContain ( "font-weight:" ) ;
870+ expect ( mobileSettingsBack ) . not . toContain ( "font-size:" ) ;
871+ expect ( mobileSettingsBack ) . not . toContain ( "line-height:" ) ;
872+ expect ( mobileSettingsBack ) . not . toContain ( "font-weight:" ) ;
845873 } ) ;
846874
847875 it ( "uses a unified inline sheet treatment for mobile selectors and keeps topbar controls height-aligned" , ( ) => {
0 commit comments