Exploring Pseudo Classes in Oracle ADF

Within my skin file (which is an extension of Skyros), I have defined a rule as:

.arrow_box:after {
    /*insert some css rules here*/
}
.arrow_box:before {
    /*insert some css rules here*/
}

The goal is to generate an arrow on the top of the box similar to what is displayed on CSSArrowPlease.

The Problem

Upon running the page, the pseudo classes are not being applied because they are being transformed into:

.arrow_box.p_AFAfter, .x1z2.p_AFAfter {
    /*insert some css rules here*/
}
.arrow_box.p_AFBefore, .x1z2.p_AFBefore {
    /*insert some css rules here*/
}

The colon ":" is being converted to ".p_AFAfter" and ".p_AFBefore". How can this be prevented?

I attempted to escape the selector with:

.arrow_box\:after {
  /*insert some css rules here*/
}

However, this resulted in:

.arrow_box\.p_AFAfter, .x1z2.p_AFAfter {
    /*insert some css rules here*/
}

Is there a workaround for this issue? My jDeveloper version is 11.1.1.9.0

Note

DISABLE_CONTENT_COMPRESSION is not feasible as I lack control over the web.xml file on the server.

Answer №1

It's important to recognize that a skin file is not your typical CSS file. Instead, it's processed by a specialized skinning engine when handling component styles.
If you only require custom CSS, creating a separate CSS file and including it on your page is sufficient. This file can be located within your skin project or web project as needed.

The beauty of using a standalone CSS file is that it remains untouched by the skin engine, preserving all your styles exactly how you define them. However, keep in mind that you'll need to explicitly assign CSS class names to components using the styleClass property instead of relying on default component styles.

Answer №2

To turn off CSS compression, simply include the following code in your web.xml

<context-param>
  <description>Enable this option to stop compressing CSS class names used for
               skinning keys, resulting in more readable class names</description>
  <param-name>org.apache.myfaces.trinidad.DISABLE_CONTENT_COMPRESSION</param-name>
  <param-value>true</param-value>
</context-param>

With this setting in place, your CSS classes will remain unobfuscated.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Achieving a seamless full-width background image without any distortion or cutting off

Is it possible to achieve a full width background without cropping, resizing, or repeating? When using background-size: cover, part of the image gets cut off, and with background-size: contain, it repeats on the right side. CSS: .home-3 { background ...

What is the best way to position a grid of divs in the center?

To elaborate on the issue in depth, I need to establish a few assumptions: I possess a list of items with an unknown length (can range from 1 to 50 or more). My objective is to exhibit these items in a grid format, where the number of items per row varie ...

Crafting a horizontal sub-menu that sits between the parent element and the company logo

Seeking assistance with designing a navigation menu that places the navigation bar above the site logo. I envision the sub-menu expanding horizontally from the navigation bar and positioning itself between the parent navigation bar and the logo. The sub- ...

Is there a way to have the headline gently fade in and subtly rise when the page loads using CSS?

Is it possible to make the headline fade in and move up slightly on the home page using CSS after the user lands on the website? For a visual reference, check out this example on . I know it can be achieved with translateY, but I have never tried it before ...

Anticipated a JavaScript module script, but the server returned a MIME type of text/html as well as text/css. No frameworks used, just pure JavaScript

I have been attempting to implement the color-calendar plugin by following their tutorial closely. I have replicated the code from both the DEMO and documentation, shown below: // js/calendar.js import Calendar from '../node_modules/color-calendar&ap ...

Creating text using the Bootstrap grid system

I am currently using Bootstrap and have set up a grid with a circle on the left side. I am now facing an issue where any text I try to add next to the circle overlaps with it. I need the text to not overlap with the circle and vice versa, while also being ...

JavaScript - Unable to unselect a button without triggering a page refresh

I have a series of buttons in a row that I can select individually. However, I only want to be able to choose one button at a time. Every time I deselect the previously selected button, it causes the page to reload when all I really want is for all the but ...

Which web browser(s) can properly display the CSS property display: run-in?

Compatibility with IE7 and FF2.0 Suitable for IE8 and Opera 9+ Works only on IE7 Optimized for IE8 and FF3.5 Supports IE7 and Safari This question came up in a quiz, but I don't have all the browsers to test it. Any assistance would be greatly apprec ...

I am attempting to create a captivating image for a "jumbotron"

My goal is to achieve a full-width image that stretches across the entire website. Furthermore, I want the image to remain centered and shrink from the sides as the window size decreases. Here's what I've attempted: HTML <div class="site-ban ...

I'm having trouble locating the HTML link in my text

I've recently started coding and I'm facing an issue. I can't seem to figure out why a link named "Food Taxi" isn't showing up. I added an href tag, but it's still not linking properly. I've tried moving some code around witho ...

Viewing HTML web pages using Mozilla Firebox

Printing an HTML table with lots of content has been a challenge for me. Google Chrome didn't work, so I switched to Mozilla Firefox. However, now Firefox is breaking the page inside the table. My question is how can I trigger print preview in Firefox ...

What methods can be utilized to ensure that my wistia video player/playlist is responsive on different devices

I need some assistance with making my Wistia player responsive while using a playlist. I want the video player to adjust its size based on the screen size. Here is an example: My current code utilizes their iframe implementation: <div id="wistia_1n649 ...

Eliminate placeholder text when the tab key is pressed

I'm currently facing an issue with a textarea that has a placeholder and the Tab key functionality in Internet Explorer. I've included placeholder.js to make it work, but when I repeatedly press the tab key and focus on the textarea, the placehol ...

The color "clear" is not functioning as intended

Having an issue with Internet Explorer (typical, right?): The problem arises when I try to generate content with CSS that includes a background-image. Here's what it looks like: #nav ul li:after { content: "--"; position: relative; z-ind ...

Unable to maintain the height of a div at 100% as it keeps reverting back to 0px

I'm having trouble setting the height of the individual parent columns (and their children) to 100% because for some reason, the div height keeps resetting to 0. The first column contains two child boxes that should each take up 50% of the page heigh ...

Contents of the container are not displayed in a single line

What could be causing the first element not to align with the other elements in the container? I'm having trouble figuring out why this is happening. The code snippet seems to work, but when I implement it on the webpage, the alignment issue arises. W ...

Struggling with the alignment of divs in a vertical manner

Looking for a way to align multiple divs inside another div vertically with even spacing between them? They should all start at the top. Currently, my solution has the child-divs positioned at the top-left corner of the parent div (see the first picture): ...

The JQuery TextNTags plugin eliminates tag formatting once the trigger syntax has been modified

I have incorporated the JQuery TextNTags plugin into my web application. Here is the original code snippet: $.browser = { webkit: true }; $(function () { $('textarea.tagged_text').textntags({ triggers: {'!': { ...

What is the process for choosing and making changes to a specific portion of a textContent?

<h1 id="block ">This is my header block</h1> To dynamically change the color of the "block" word every 2 seconds using JavaScript: let colors = ["blue", "green", "pink", "purple"]; let curColor = 0; const changeColor = () => { ...

Learn the steps to create a vertically tiled background using a clipped image

My goal is to create a vertically tiled background by clipping the top 50px of a background image and using only that portion. However, the code I have below isn't working as expected. Even though I've given a higher z-index to the <div class= ...