VideosCSS Inspector

Overview

Duration: 03:14
This video presents the CSS Inspector view that allows you to analyze and change the styles of XML elements.

Transcript

00:00:08The oXygen autor mode renders the XML documents using CSS stylesheets.
00:00:14Starting with version 17, oXygen adds the possibility to examine and customize the CSS
00:00:20rules that apply to a specific element.
00:00:23This can be done using the Inspect styles action from the contextual menu, which displays the
00:00:29CSS Inspector view.
00:00:31Note that this is very similar to the element inspection feature offered by modern web browsers.
00:00:38To see this in action, let's open an XML travel guide sample file in the Author visual editing mode.
00:00:46This file has a very simple XML document structure.
00:00:50To navigate the hierarchy of its elements you can use either the Outline view and the
00:00:54breadcrumb navigation, or directly click the in-place element tags.
00:01:00Now, let's display the CSS Inspector view, using the Inspect Styles action and select
00:01:06the title element.
00:01:09By default, the CSS Inspector view is positioned on the right side of the application.
00:01:15Its content is updated each time the cursor moves to another element.
00:01:27The CSS Inspector view contains multiple tabs:
00:01:31First... there is the Element tab, which shows the rules for the current element, as they
00:01:36are written in the CSS document.
00:01:38Each rule has a link to its source code.
00:01:40Clicking on that link opens the CSS file and positions the cursor on the rule selector.
00:01:47The Computed tab shows the styles, as they are obtained by combining the CSS rules.
00:01:53The Path tab shows the element ancestors and their attributes.
00:01:58The display format makes it easy to copy and paste segments of the path into a CSS,
00:02:04in order to create new rules.
00:02:06Additional tabs presenting the" :before" and ":after" rules are displayed
00:02:11when the current element has associated static pseudo elements.
00:02:16We will now try to change the aspect of the "title" element.
00:02:20We want to modify its font style to italic, make it bigger and remove the bold style.
00:02:27We see in the CSS Inspector that there is a rule matching this element in the "travel-guide.css" file.
00:02:35We click the link to open the associated CSS file and navigates directly to the CSS rule.
00:02:43Now we'll add the font styling properties... font-size ... font-weight ... then the font-style...
00:02:54And now we save the CSS file, then go back to our travel guide.
00:03:00The updated CSS file is automatically applied over our XML document and as you can see,
00:03:06the style of the title element has now changed.
00:03:10And this concludes our demonstration.
00:03:12Thanks for watching!

Use Oxygen Feedback to ask us anything about this video.