-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build:maintained poll percentage ,voted poll using localstorage and a…
…dded styles
- Loading branch information
Showing
3 changed files
with
169 additions
and
41 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,113 @@ | ||
/* src/App.css */ | ||
/* src/components/Polls.css */ | ||
|
||
.App { | ||
.poll-container { | ||
font-family: Arial, sans-serif; | ||
margin: 20px; | ||
background-color: #f0f2f5; /* Light grey background like Facebook */ | ||
padding: 20px; | ||
border-radius: 10px; | ||
width:60%; | ||
margin: 0 auto; | ||
} | ||
|
||
.title { | ||
text-align: center; | ||
margin-bottom: 20px; | ||
font-size: 24px; | ||
color: #1877f2; /* Facebook blue */ | ||
} | ||
|
||
.App-header { | ||
background-color: #282c34; | ||
min-height: 10vh; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
font-size: calc(10px + 2vmin); | ||
color: white; | ||
.poll-section { | ||
margin-bottom: 30px; | ||
padding: 15px; | ||
border: 1px solid #ccc; | ||
border-radius: 8px; | ||
background-color: white; | ||
} | ||
|
||
main { | ||
padding: 20px; | ||
.latest { | ||
border: 2px solid #1877f2; /* Facebook blue */ | ||
} | ||
|
||
button { | ||
margin-left: 10px; | ||
padding: 5px 10px; | ||
cursor: pointer; | ||
.section-title { | ||
font-size: 20px; | ||
margin-bottom: 15px; | ||
color: #1877f2; /* Facebook blue */ | ||
} | ||
|
||
.poll { | ||
margin-bottom: 20px; | ||
} | ||
|
||
.poll-header { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
} | ||
|
||
.poll-date { | ||
font-size: 14px; | ||
color: #666; | ||
} | ||
|
||
h1, h3 { | ||
color: #282c34; | ||
.poll-question { | ||
font-size: 20px; | ||
margin-bottom: 10px; | ||
color: #333; | ||
font-weight: bolder; | ||
} | ||
|
||
ul { | ||
.choices-list { | ||
list-style-type: none; | ||
padding: 0; | ||
} | ||
|
||
li { | ||
margin: 10px 0; | ||
.choice-item { | ||
padding: 10px; | ||
border-bottom: 1px solid #ddd; | ||
display: grid; | ||
grid-template-columns: 0.3fr 1fr; | ||
align-items: center; | ||
font-size: 16px; | ||
margin-bottom: 5px; | ||
font-weight:600; | ||
} | ||
.choice-item:last-child { | ||
border-bottom: none; | ||
} | ||
|
||
|
||
|
||
|
||
|
||
.vote-result { | ||
background-color: #3281e9; /* Facebook blue */ | ||
color: white; | ||
padding: 5px; | ||
border-radius: 5px; | ||
transition: width 0.5s ease-in-out; | ||
height: 20px; | ||
display: inline-block; /* Ensure the block starts from the left */ | ||
overflow: hidden; /* Prevent overflow text */ | ||
white-space: nowrap; /* Prevent line breaks */ | ||
text-align: right; | ||
padding: 5px; | ||
margin-left: 10px; | ||
min-width: 30px; /* Minimum width to ensure text visibility */ | ||
position: relative; | ||
} | ||
|
||
.vote-result span { | ||
position: absolute; | ||
left: 50%; | ||
transform: translateX(-50%); | ||
white-space: nowrap; /* Prevent text from wrapping */ | ||
pointer-events: none; /* Prevent text from interfering with clicking */ | ||
} | ||
|
||
|
||
@media (max-width: 600px) { | ||
.poll-container { | ||
width: 98%; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters