Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8121143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:23:19+00:00 2026-06-06T05:23:19+00:00

Is it possible to compute resulting css style on the element manually (without need

  • 0

Is it possible to compute resulting css style on the element manually (without need to render it)?

Lets say I’m supposed to have an HTML structure:

<p style="some_style1">
  <span style="some_style2">
    <span style="some_style3">
       TEXT
    </span>
  </span>
</p>

I know what are some_style1, some_style2, some_style3 in terms of JS object (for example i have data for each element like: {font: 'Times New Roman' 12px bold; text-align: center;})

I want to MANUALLY (without need to render in browser the whole structure) compute resulting style that will effect “TEXT”.

What algorithm (or solution) should I use?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T05:23:21+00:00Added an answer on June 6, 2026 at 5:23 am

    There exist browsers that don’t need rendering in a window (headless browser). You can load a page and query what you want. It won’t be easier than in a normal browser to obtain what you ask though.

    JSCSSP is a CSS parser written in cross-browser JavaScript that could be a first step to achieve what you want from scratch or quite. Give it a stylesheet and it’ll tell you what a browser would’ve parsed. You still must manage:

    • the DOM,
    • inheritance of styles,
    • determine which rules apply to a given element with or without class, id, attributes, siblings, etc
    • priorities of selectors
    • etc

    Its author is D. Glazman, co-chairman of the W3C CSS group and developer of Kompozer, NVu and BlueGriffon so it should parse CSS as expected 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Python, compute list difference I have two lists For example: A =
Is it possible to have JavaScript compute a timestamp returned from PHP's time() function
Possible Duplicate: Compute Median of Values Stored In Vector - C++? I need to
Is it possible to compute the hash of a class at runtime in C#
Is it possible to compute the number of different elements in an array in
Is it possible to directly compute the product (or for example sum) of two
Is it possible to edit computed-column values? I have a computed-col in my table,
Is it possible to learn C# as your first computer language without any knowledge
I need to compute the area of the region of overlap between two triangles
I have two passwords and two resulting hashes. I can't figure out how the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.