<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: c3phalik</title>
    <description>The latest articles on DEV Community by c3phalik (@saif_khan_67333bd574c6c8c).</description>
    <link>https://dev.to/saif_khan_67333bd574c6c8c</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3370134%2Fe75bf446-b52b-4288-b4d7-397d0a45f1ee.png</url>
      <title>DEV Community: c3phalik</title>
      <link>https://dev.to/saif_khan_67333bd574c6c8c</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/saif_khan_67333bd574c6c8c"/>
    <language>en</language>
    <item>
      <title>Fix Razorpay Iframe White Background in Dark Mode</title>
      <dc:creator>c3phalik</dc:creator>
      <pubDate>Fri, 30 Jan 2026 21:34:22 +0000</pubDate>
      <link>https://dev.to/saif_khan_67333bd574c6c8c/fix-razorpay-iframe-white-background-in-dark-mode-39i1</link>
      <guid>https://dev.to/saif_khan_67333bd574c6c8c/fix-razorpay-iframe-white-background-in-dark-mode-39i1</guid>
      <description>&lt;h2&gt;
  
  
  Problem
&lt;/h2&gt;

&lt;p&gt;When embedding &lt;strong&gt;Razorpay Checkout&lt;/strong&gt; on a page with dark mode enabled, the iframe renders with an opaque white background instead of the expected semi-transparent backdrop. This creates a jarring visual experience where the modal appears as a white box against a dark-themed page.&lt;/p&gt;

&lt;h2&gt;
  
  
  Root Cause
&lt;/h2&gt;

&lt;p&gt;This is a &lt;strong&gt;browser behavior&lt;/strong&gt;, not a Razorpay bug.&lt;/p&gt;

&lt;p&gt;When the embedding page defines a &lt;code&gt;color-scheme&lt;/code&gt; (for example, &lt;code&gt;dark&lt;/code&gt;), browsers attempt to apply a matching background to embedded iframes. Because Razorpay Checkout does not natively support dark mode, the browser forces an opaque light background on the iframe content.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;p&gt;Explicitly set &lt;code&gt;color-scheme: light;&lt;/code&gt; on the iframe. This tells the browser that the iframe should always be rendered using a light color scheme, overriding the parent page’s dark-mode inference.&lt;/p&gt;

&lt;h3&gt;
  
  
  CSS Fix (Recommended)
&lt;/h3&gt;

&lt;p&gt;Add the following rule to your stylesheet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="c"&gt;/* Prevent the browser from forcing a dark-mode background on iframe content */&lt;/span&gt;
&lt;span class="nt"&gt;iframe&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;color-scheme&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;light&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Alternative: Inline Style
&lt;/h3&gt;

&lt;p&gt;You can also apply this directly to the iframe element:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;iframe&lt;/span&gt;
  &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"your-razorpay-url"&lt;/span&gt;
  &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"color-scheme: light;"&lt;/span&gt;
&lt;span class="nt"&gt;&amp;gt;&amp;lt;/iframe&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Targeted Selector (Optional)
&lt;/h3&gt;

&lt;p&gt;If you want to scope the fix only to Razorpay iframes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;iframe&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;src&lt;/span&gt;&lt;span class="o"&gt;*=&lt;/span&gt;&lt;span class="s1"&gt;"razorpay"&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;color-scheme&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;light&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why This Works
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;color-scheme&lt;/code&gt; CSS property controls how browsers render built-in UI and default backgrounds for an element. By setting &lt;code&gt;color-scheme: light;&lt;/code&gt; on the iframe:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The browser stops inheriting the dark color scheme from the parent page&lt;/li&gt;
&lt;li&gt;The iframe renders using its intended light-mode styles&lt;/li&gt;
&lt;li&gt;The semi-transparent backdrop displays correctly&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Razorpay-Specific Notes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;For the &lt;strong&gt;Razorpay Affordability Widget&lt;/strong&gt;, dark mode can be enabled via official configuration options&lt;/li&gt;
&lt;li&gt;For standard &lt;strong&gt;Razorpay Checkout&lt;/strong&gt;, this CSS rule is the recommended workaround&lt;/li&gt;
&lt;li&gt;This fix affects only visual rendering and does &lt;strong&gt;not&lt;/strong&gt; impact checkout functionality&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://sergeyski.com/css-color-scheme-and-iframes-lessons-learned-from-disqus-background-bug/" rel="noopener noreferrer"&gt;CSS &lt;code&gt;color-scheme&lt;/code&gt; and iframes – Sergeyski&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://fvsch.com/transparent-iframes" rel="noopener noreferrer"&gt;Transparent iframes and dark mode – fvsch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/tailwindlabs/tailwindcss/discussions/12057" rel="noopener noreferrer"&gt;Tailwind CSS iframe dark mode discussion&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>razorpay</category>
    </item>
    <item>
      <title>How to monitor Claude code token usage?</title>
      <dc:creator>c3phalik</dc:creator>
      <pubDate>Tue, 12 Aug 2025 05:56:58 +0000</pubDate>
      <link>https://dev.to/saif_khan_67333bd574c6c8c/how-to-monitor-claude-code-token-usage-2en3</link>
      <guid>https://dev.to/saif_khan_67333bd574c6c8c/how-to-monitor-claude-code-token-usage-2en3</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhk6lq7fvt4i0f44gyndf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhk6lq7fvt4i0f44gyndf.png" alt="CC Usage example screenshot" width="800" height="290"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Monitor Your Claude API Token Usage with &lt;em&gt;&lt;strong&gt;CCUsage&lt;/strong&gt;&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;If you're leveraging the Claude API for your coding projects, keeping track of your token consumption is crucial to managing costs and staying within limits. &lt;/p&gt;

&lt;p&gt;Well, there's a handy tool designed to help you monitor your usage effectively: CCUsage. This tool provides a straightforward way to check your Claude API token usage and associated costs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Getting Started with CCUsage
&lt;/h3&gt;

&lt;p&gt;To use CCUsage, you’ll need to have Node.js installed, as the tool runs via npx. Here are the key commands to get started:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx ccusage@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check Token Usage by Time Period&lt;br&gt;
Run the following command to view your token usage for a specific timeframe:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx ccusage@latest opts [daily | weekly | monthly]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command allows you to analyze your usage daily, weekly, or monthly, helping you understand your consumption patterns and costs.&lt;/p&gt;

&lt;p&gt;Live Monitoring with Automatic Token Limit Detection&lt;br&gt;
For real-time insights, CCUsage offers a live monitoring feature that automatically detects your token limits based on your usage history:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx ccusage@latest blocks --live
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you're using Claude code with the API (I don't know why would anyone do that), this tool will help you a great deal.&lt;/p&gt;

&lt;p&gt;And if you use CC via the monthly plans, it's really cool to check how much you have saved using the subscription.&lt;/p&gt;

</description>
      <category>vibecoding</category>
      <category>anthropic</category>
      <category>claudecode</category>
      <category>webdev</category>
    </item>
    <item>
      <title>n8n + Google Cloud Storage: The resource you are requesting could not be found (Request failed with status code 404)</title>
      <dc:creator>c3phalik</dc:creator>
      <pubDate>Sat, 19 Jul 2025 14:24:16 +0000</pubDate>
      <link>https://dev.to/saif_khan_67333bd574c6c8c/n8n-google-cloud-storage-the-resource-you-are-requesting-could-not-be-found-request-failed-with-8gg</link>
      <guid>https://dev.to/saif_khan_67333bd574c6c8c/n8n-google-cloud-storage-the-resource-you-are-requesting-could-not-be-found-request-failed-with-8gg</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;n8n version: 1.94.1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Solving 404 Errors in n8n when Using Google Cloud Storage
&lt;/h2&gt;

&lt;p&gt;When working with Google Cloud Storage in n8n, you might encounter 404 errors when trying to retrieve an object from a bucket, even when you are sure the file exists. &lt;/p&gt;

&lt;p&gt;This is often caused by special characters in the file path, such as slashes (/), spaces, or other non-alphanumeric characters that can be misinterpreted by the Google Cloud Storage API.&lt;/p&gt;

&lt;p&gt;Fortunately, the solution is simple: URL encoding. &lt;/p&gt;

&lt;p&gt;URL encoding transforms special characters into a format that the API can correctly interpret, ensuring that your object path is handled properly.&lt;/p&gt;

&lt;p&gt;Let's fix the issue and retrieve the object successfully using n8n with Google Cloud Storage.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;In a typical scenario, you might encounter a 404 error when trying to fetch an object from a bucket in Google Cloud Storage:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The resource you are requesting could not be found.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This error often occurs when there are special characters in the file path (like slashes, colons, or spaces) that Google Cloud Storage fails to correctly interpret.&lt;/p&gt;

&lt;p&gt;For example, an object path such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;folder_name/file.ext
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;is sometimes misread by the Google Cloud Storage API due to the / character. If it's not properly encoded, it leads to the file not being found, resulting in a 404 error.&lt;br&gt;
The Solution: URL Encoding&lt;/p&gt;

&lt;p&gt;To resolve this issue, we can apply URL encoding to the objectName in n8n. URL encoding converts special characters into a format that is safe for URLs. For instance:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Slash (/) becomes %2F

Space ( ) becomes %20

Colon (:) becomes %3A
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;By encoding the file path&lt;/strong&gt;, we can avoid the misinterpretation of these characters, ensuring the API can fetch the correct file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to Apply URL Encoding in n8n:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In n8n, you can easily use URL encoding in the Expression Editor to encode your objectName. Here’s how you can implement it:&lt;/p&gt;
&lt;h3&gt;
  
  
  File Name Without URL Encoding (Will throw an error - 404):
&lt;/h3&gt;

&lt;p&gt;You might start with a simple expression like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Object Name = "{{ $json.file_name }}"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This returns the file path directly, which may contain characters that Google Cloud Storage cannot interpret, such as the slash (/).&lt;/p&gt;

&lt;h3&gt;
  
  
  File Name With URL Encoding (Solution):
&lt;/h3&gt;

&lt;p&gt;To encode the file path, you can use the .urlEncode() function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{{ $json.file_name.urlEncode() }}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;For example, if your objectName is:

folder_name/file.ext

It will be encoded to:

folder_name0%2Ffile.ext
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This ensures that Google Cloud Storage correctly interprets the object path, and the 404 error will be resolved.&lt;/p&gt;

</description>
      <category>n8n</category>
      <category>cloud</category>
      <category>googlecloud</category>
    </item>
  </channel>
</rss>
