profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/osiris86/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

osiris86/androidannotations 0

Fast Android Development. Easy maintainance.

osiris86/ComicReader 0

Android application for reading comic strips over internet

osiris86/countly-sdk-android 0

Countly Product Analytics Android SDK

osiris86/gitbook-2016-berlin-barcamp 0

Notes, resources, sessions of barcamp at Droidcon Berlin 2016

osiris86/gitlab-uberspace-tutorial 0

Howto install GitLab at https://uberspace.de (look at Branches for different Gitlab-Versions)

issue closedbestguy/sveltestrap

Not able to set custom css class on Components

Hi there,

I'm wondering how to style a single sveltestrap component. I found other issues with similar problems that styled the components using :global. This obviously styles all the components. But only applying a style to a single component seems so obvious to me, that I'm currently refusing to believe that this isn't possible.

Here's a reproducable example:

  • Create a new Svelte project degit sveltejs/template my-test-project
  • Converted to TypeScript node scripts/setupTypeScript.js
  • Installed dependencies npm install
  • Installed sveltestrap npm install sveltestrap
  • Changed the src/App.svelte file like that:
<script>
	export let name;
  import { Button, Col, Row } from 'sveltestrap';
</script>

<main>
	<h1>Hello {name}!</h1>
	<p>Visit the <a href="https://svelte.dev/tutorial">Svelte tutorial</a> to learn how to build Svelte apps.</p>
  <Row>
    <Col class="hello-world">
      <Button color="primary" outline>Hello World!</Button>
    </Col>
  </Row>
</main>

<style>
  @import "https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css";
	main {
		text-align: center;
		padding: 1em;
		max-width: 240px;
		margin: 0 auto;
	}

	h1 {
		color: #ff3e00;
		text-transform: uppercase;
		font-size: 4em;
		font-weight: 100;
	}

	@media (min-width: 640px) {
		main {
			max-width: none;
		}
	}
  
  .hello-world {
    background-color: #ff0000;
  }
</style>

What I expected to happen?

The column component would pick up my hello-world class and have a red background

What actually happened?

I get a compile warning:

(!) Plugin svelte: Unused CSS selector ".hello-world"
src/App.svelte
36:   }
37:   
38:   .hello-world {
      ^
39:     background-color: #ff0000;
40:   }

The resulting HTML actually has a "hello-world" class, but not a special svelte class as usual components.

If I use the default bootstrap class, i.e. replace <Col class="hello-world"> with <div class="col hello-world"> everything works as expected.

Is it really not possible like that or am I missing something here?

closed time in 16 days

osiris86

issue commentbestguy/sveltestrap

Not able to set custom css class on Components

Wow, very quick reply. Thank you! That makes sense to me. Obviously, I'm fairly new to svelte and wasn't aware of these limitations. This just seemed like such a common problem to me (and it kinda is, as the discussion in the linked PR suggests :) ).

Closing this, since this isn't an issue with sveltestrap. Thanks for your help!

osiris86

comment created time in 16 days

issue openedbestguy/sveltestrap

Not able to set custom css class on Components

Hi there,

I'm wondering how to style a single sveltestrap component. I found other issues with similar problems that styled the components using :global. This obviously styles all the components. But only applying a style to a single component seems so obvious to me, that I'm currently refusing to believe that this isn't possible.

Here's a reproducable example:

  • Create a new Svelte project degit sveltejs/template my-test-project
  • Converted to TypeScript node scripts/setupTypeScript.js
  • Installed dependencies npm install
  • Installed sveltestrap npm install sveltestrap
  • Changed the src/App.svelte file like that:
<script>
	export let name;
  import { Button, Col, Row } from 'sveltestrap';
</script>

<main>
	<h1>Hello {name}!</h1>
	<p>Visit the <a href="https://svelte.dev/tutorial">Svelte tutorial</a> to learn how to build Svelte apps.</p>
  <Row>
    <Col class="hello-world">
      <Button color="primary" outline>Hello World!</Button>
    </Col>
  </Row>
</main>

<style>
  @import "https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css";
	main {
		text-align: center;
		padding: 1em;
		max-width: 240px;
		margin: 0 auto;
	}

	h1 {
		color: #ff3e00;
		text-transform: uppercase;
		font-size: 4em;
		font-weight: 100;
	}

	@media (min-width: 640px) {
		main {
			max-width: none;
		}
	}
  
  .hello-world {
    background-color: #ff0000;
  }
</style>

What I expected to happen?

The column component would pick up my hello-world class and have a red background

What actually happened?

I get a compile warning:

(!) Plugin svelte: Unused CSS selector ".hello-world"
src/App.svelte
36:   }
37:   
38:   .hello-world {
      ^
39:     background-color: #ff0000;
40:   }

The resulting HTML actually has a "hello-world" class, but not a special svelte class as usual components.

If I use the default bootstrap class, i.e. replace <Col class="hello-world"> with <div class="col hello-world"> everything works as expected.

Is it really not possible like that or am I missing something here?

created time in 16 days

pull request commentCountly/countly-sdk-android

Fixes Implicit PendingIntent Issue

I don't know, really. Because the article suggests to apply "any (or even better, all)" of the suggestions, I tried to do as many as possible. So, I haven't tried with the flag only.

osiris86

comment created time in 18 days

PR opened Countly/countly-sdk-android

Fixes Implicit PendingIntent Issue

More information about the issue can be found here: https://support.google.com/faqs/answer/10437428

When creating the BroadcastIntent in the displayNotification method, we now follow all the recommendations provided by Google in the above help center article.

Unfortunately according to this Stackoverflow answer, which links to this blog post it's not possible to use an explicit Intent when dynamically registering the broadcast receiver.

For that reason I registered the receiver in the Manifest with the necessary filter as I wasn't able to find out why you went for a dynamic registering of the receiver.

When creating an update with that fix included, we were able to get our update approved by Google. So this definitely fixes the issue and I hope it doesn't break something else :)

+12 -10

0 comment

2 changed files

pr created time in 18 days

push eventosiris86/countly-sdk-android

Michael Schmidt

commit sha 4cc65ac22cac3f9dc5b73b7bdf42d9d97c6a22c2

Fixed implicit PendingIntent issue

view details

push time in 18 days