Skip to content

Commit c4dbfdb

Browse files
authored
Revert "Add HTML data attributes to background and hero elements (#940)" (#944)
This reverts commit 65c7cd6. Fixes rdar://149293880
1 parent 65c7cd6 commit c4dbfdb

File tree

10 files changed

+5
-31
lines changed

10 files changed

+5
-31
lines changed

src/components/DocumentationTopic/Hero/DocumentationHero.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
'documentation-hero--disabled': !enhanceBackground,
1515
}]"
1616
:style="styles"
17-
:data-hero="enhanceBackground"
1817
>
1918
<div class="icon">
2019
<TopicTypeIcon

src/components/Tutorial.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
-->
1010

1111
<template>
12-
<div class="tutorial" data-background>
12+
<div class="tutorial">
1313
<NavigationBar
1414
v-if="!isTargetIDE"
1515
:technology="metadata.category"

src/components/Tutorial/Hero.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
:title="sectionTitle"
1515
class="tutorial-hero"
1616
>
17-
<div class="hero dark" data-hero>
17+
<div class="hero dark">
1818
<div v-if="backgroundImageUrl" class="bg" :style="bgStyle" />
1919
<slot name="above-title" />
2020
<Row>

src/components/TutorialsOverview.vue

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
{{ title }}
1919
</Nav>
2020
<main id="app-main" tabindex="0" class="main">
21-
<div class="radial-gradient" data-hero>
21+
<div class="radial-gradient">
2222
<slot name="above-hero" />
2323
<Hero
2424
v-if="heroSection"
@@ -129,19 +129,13 @@ export default {
129129
margin-top: -$nav-height;
130130
padding-top: $nav-height;
131131
132-
@include inTargetIde() {
133-
margin-top: 0;
134-
padding-top: 0;
135-
}
136-
137132
@include breakpoint(small) {
138133
margin-top: -$nav-height-small;
139134
padding-top: $nav-height-small;
140135
}
141136
142137
background: var(--color-tutorials-overview-fill-secondary,
143138
var(--color-tutorials-overview-background));
144-
background-color: var(--color-tutorials-overview-background-color);
145139
}
146140
147141
// HACK - remove the gradient for firefox only

src/components/TutorialsOverview/LearningPath.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
-->
1010

1111
<template>
12-
<div class="learning-path" :class="classes" data-background>
12+
<div class="learning-path" :class="classes">
1313
<div class="main-container">
1414
<div v-if="!isTargetIDE" class="secondary-content-container">
1515
<TutorialsNavigation :sections="sections" :aria-label="$t('sections.on-this-page')" />

src/styles/core/colors/_light.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,7 @@
183183
--color-tutorial-navbar-dropdown-background: var(--color-fill);
184184
--color-tutorial-navbar-dropdown-border: var(--color-fill-gray);
185185
--color-tutorial-quiz-border-active: var(--color-figure-blue);
186-
--color-tutorials-overview-background-color: #{dark-color(fill-secondary)};
187-
--color-tutorials-overview-background: var(--color-tutorials-overview-background-color);
186+
--color-tutorials-overview-background: #{dark-color(fill-secondary)};
188187
--color-tutorials-overview-content: #{dark-color(figure-gray)};
189188
--color-tutorials-overview-content-alt: #{dark-color(figure-gray)};
190189
--color-tutorials-overview-eyebrow: #{dark-color(figure-gray-secondary)};

tests/unit/components/DocumentationTopic/Hero/DocumentationHero.spec.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ describe('DocumentationHero', () => {
4141
const withBackground = createWrapper();
4242
expect(withBackground.classes('documentation-hero')).toBe(true);
4343
expect(withBackground.classes('documentation-hero--disabled')).toBe(false);
44-
// exposes a data-hero HTML data attribute
45-
expect(withBackground.attributes('data-hero')).toBeDefined();
4644

4745
const withoutBackground = createWrapper({
4846
propsData: {
@@ -51,8 +49,6 @@ describe('DocumentationHero', () => {
5149
});
5250
expect(withoutBackground.classes('documentation-hero')).toBe(true);
5351
expect(withoutBackground.classes('documentation-hero--disabled')).toBe(true);
54-
// does not expose a data-hero HTML data attribute if there is no background
55-
expect(withoutBackground.attributes('data-hero')).not.toBeDefined();
5652
});
5753

5854
it('renders the DocumentationHero, enabled', () => {

tests/unit/components/Tutorial.spec.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,6 @@ describe('Tutorial', () => {
189189
expect(wrapper.is('div.tutorial')).toBe(true);
190190
});
191191

192-
it('exposes a data-background in its background element', () => {
193-
expect(wrapper.attributes('data-background')).toBeDefined();
194-
});
195-
196192
it('renders a `NavigationBar`', () => {
197193
const nav = wrapper.find(NavigationBar);
198194
expect(nav.exists()).toBe(true);

tests/unit/components/TutorialsOverview.spec.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,6 @@ describe('TutorialsOverview', () => {
9494
expect(wrapper.contains(Nav)).toBe(false);
9595
});
9696

97-
it('exposes a data-hero HTML data attribute in the radial gradient', () => {
98-
const radialGradient = wrapper.find('.radial-gradient');
99-
expect(radialGradient.exists()).toBe(true);
100-
expect(radialGradient.attributes('data-hero')).toBeDefined();
101-
});
102-
10397
it('renders a `Hero`', () => {
10498
const hero = wrapper.find(Hero);
10599
expect(hero.exists()).toBe(true);

tests/unit/components/TutorialsOverview/LearningPath.spec.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@ describe('LearningPath', () => {
5353
expect(wrapper.is('.learning-path')).toBe(true);
5454
});
5555

56-
it('exposes a data-background in its background element', () => {
57-
expect(wrapper.attributes('data-background')).toBeDefined();
58-
});
59-
6056
it('renders a TutorialsNavigation if in Web mode', () => {
6157
const navigation = wrapper.find(TutorialsNavigation);
6258
expect(navigation.exists()).toBe(true);

0 commit comments

Comments
 (0)