Skip to content

Feat: CSS - css.raw() API support#224

Merged
github-actions[bot] merged 1 commit intomainfrom
css-raw
Jul 20, 2025
Merged

Feat: CSS - css.raw() API support#224
github-actions[bot] merged 1 commit intomainfrom
css-raw

Conversation

@black7375
Copy link
Contributor

@black7375 black7375 commented Jul 20, 2025

Description

Return typed CSS object

Related Issue

Summary by CodeRabbit

  • New Features
    • Introduced a new method to access raw CSS style objects directly via the existing CSS utility.

Additional context

Checklist

@coderabbitai
Copy link

coderabbitai bot commented Jul 20, 2025

Walkthrough

A new internal function, cssRaw, was introduced to return style objects as-is. This function is exposed as a raw property on the existing exported css function, allowing access via css.raw. No other logic or control flow changes were made.

Changes

File(s) Change Summary
packages/css/src/css/index.ts Added internal cssRaw function and exposed it as css.raw export

Poem

A bunny with code on its mind,
Added a function, simple and kind.
Now css.raw hops into view,
Returning styles—nothing new!
With Object.assign, the change is small,
Yet it brings delight to us all.
🐇✨

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

yarn install v1.22.22
[1/4] Resolving packages...
(node:11301) [DEP0169] DeprecationWarning: url.parse() behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for url.parse() vulnerabilities.
(Use node --trace-deprecation ... to show where the warning was created)
error Couldn't find any versions for "eslint-config-custom" that matches "workspace:^"
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ee6e517 and cfa814e.

📒 Files selected for processing (1)
  • packages/css/src/css/index.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: black7375
PR: mincho-js/mincho#113
File: packages/css/src/index.ts:33-33
Timestamp: 2024-10-09T13:00:38.449Z
Learning: `recipe` is properly exported from './rules' in `packages/css/src/rules/index.ts`.
packages/css/src/css/index.ts (1)
Learnt from: black7375
PR: mincho-js/mincho#113
File: packages/css/src/index.ts:33-33
Timestamp: 2024-10-09T13:00:38.449Z
Learning: `recipe` is properly exported from './rules' in `packages/css/src/rules/index.ts`.
🧬 Code Graph Analysis (1)
packages/css/src/css/index.ts (1)
packages/transform-to-vanilla/src/types/style-rule.ts (1)
  • ComplexCSSRule (26-26)
🔇 Additional comments (2)
packages/css/src/css/index.ts (2)

108-110: LGTM! Clean identity function implementation.

The cssRaw function correctly implements the intended functionality - returning the input style object unchanged while maintaining proper typing with ComplexCSSRule.


113-113: Perfect API extension following established patterns.

The addition of raw: cssRaw to the Object.assign call correctly exposes the new API as css.raw while maintaining consistency with the existing multiple property pattern.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link
Contributor

Triggered from #224 by @​black7375.

Checking if we can fast forward main (ee6e517) to css-raw (cfa814e).

Target branch (main):

commit ee6e51736f26effa8bcb72d8d5cd907c2de629d8 (HEAD -> main, origin/main)
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Mon Jun 9 00:00:00 2025 +0900

    Feat: CSS - css.multiple() API supports #221

Pull request (css-raw):

commit cfa814e32ec63a3c3348923247450c6949482904 (pull_request/css-raw)
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Tue Jun 10 00:00:00 2025 +0900

    Feat: CSS - css.raw() API support #223

It is possible to fast forward main (ee6e517) to css-raw (cfa814e). If you have write access to the target repository, you can add a comment with /fast-forward to fast forward main to css-raw.

@black7375
Copy link
Contributor Author

/fast-forward

@github-actions
Copy link
Contributor

Triggered from #224 (comment) by @​black7375.

Trying to fast forward main (ee6e517) to css-raw (cfa814e).

Target branch (main):

commit ee6e51736f26effa8bcb72d8d5cd907c2de629d8 (HEAD -> main, origin/main)
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Mon Jun 9 00:00:00 2025 +0900

    Feat: CSS - css.multiple() API supports #221

Pull request (css-raw):

commit cfa814e32ec63a3c3348923247450c6949482904 (pull_request/css-raw)
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Tue Jun 10 00:00:00 2025 +0900

    Feat: CSS - css.raw() API support #223

Fast forwarding main (ee6e517) to css-raw (cfa814e).

$ git push origin cfa814e32ec63a3c3348923247450c6949482904:main
To https://github.com/mincho-js/mincho.git
   ee6e517..cfa814e  cfa814e32ec63a3c3348923247450c6949482904 -> main

@github-actions github-actions bot merged commit cfa814e into main Jul 20, 2025
12 checks passed
@github-actions github-actions bot deleted the css-raw branch July 20, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant